in reply to Re: Path to enlightment
in thread Path to enlightment
OK, I ++'d KM for his answer, since it gives what was asked for -- a hint. Slightly more than a hint:
# FILE is open for read, OUTPUT is open for writing while (<FILE>) { s/^(\d+:)//; # take $_, replace one or more # digits at the beginning of the line #followed by a : with #nothing print OUTPUT; }
Note: that may not be exactly what you want; for how to change it, see KM's first reference. 'Course, there's some one-liner goodness to be had here too (you can do this on the command line with one -- albeit complex -- command. For that, see:
perldoc perlrun
Specifically, the -p switch).
Good luck!
Philosophy can be made out of anything. Or less -- Jerry A. Fodor
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Path to enlightment
by KM (Priest) on Jan 23, 2001 at 23:48 UTC | |
by tye (Sage) on Jan 23, 2001 at 23:53 UTC | |
by KM (Priest) on Jan 24, 2001 at 00:12 UTC | |
by spaz (Pilgrim) on Jan 24, 2001 at 00:17 UTC |