If there are no leading spaces in the original file then there shouldn't be any in the newly printed file.
Something like this will work fine...
open NEW, ">the new file" or die $!;
while (<OLD>) {
chomp;
print NEW substr($_, 0, 77) . "\n";
}
close NEW;
close OLD;
Something like this will work fine...
Code:
open OLD, "the old file" or die $!; open NEW, ">the new file" or die $!;
while (<OLD>) {
chomp;
print NEW substr($_, 0, 77) . "\n";
}
close NEW;
close OLD;