in reply to Re^2: Regex in a printfile?
in thread Regex in a printfile?
huh, there's already a solution that doesn't use any modules in this thread.
But apply can be implemented using map pretty easily.
print OUTFILE map { my $s = $_; $s =~ s/\s*#.*/; $s } grep { !/^\s*#/ } <INFILE>;
You could even merge the map with the grep, but then it looks like spagetti.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Regex in a printfile?
by Andrew_Levenson (Hermit) on Nov 16, 2006 at 02:57 UTC | |
by ikegami (Patriarch) on Nov 16, 2006 at 03:19 UTC |