in reply to Re: Substitution all parts of an array...
in thread Substitution all parts of an array...
while (<IN>) { chomp; $_ =~ s/://g; print OUT $_ ."\n"; }
you can get rid of the chomp; and then you don't need to append "\n" when printing.
in the second option, iterating twice on the data (once for reading the file and then another time for the substitution) can get pretty inefficient if the file is big.
just my 2 cents.
|
---|