I am trying to strip off ^Ms from a number of text files.
The following does not seem to work. any suggestions?
my $filename ;
while ($filename = shift) {
open (INF, $filename) or die "Could not open $filename. $!" ;
my @file = <INF> ;
close INF ;
open (OUT, ">$filename") or die "Could not open $filename. $!" ;
foreach my $line (@file) {
$line =~ s/\015\012// ; ## <===== something wrong with this?
print OUT $line,"\n" ;
}
close OUT ;
}
Thank you.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]