in reply to File read and strip
What about replacing that with:for(@array){ ($i)= grep { m/^#/ } $_; push @new, $i; }
foreach my $line (@array) { next if ($line =~ /^#/); push @new, $line; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: File read and strip
by Andrew_Levenson (Hermit) on Nov 14, 2006 at 20:00 UTC | |
by markh (Scribe) on Nov 14, 2006 at 20:30 UTC |