On Sat, Jan 27, 2001 at 06:18:20PM -0500, Michael G Schwern wrote:
> > $ perl -pli -e chop FILES
>
> The autochomp nature of -l confuses the example (took me a sec to
Well, if you're trying to discredit chop as a way to remove newlines from the
end of strings, using one of the other ways to do it in the same example might
serve to accentuate the point. I do, however, concede that the flag is easy to
miss. How about:
$ perl -pi -e chomp,chop FILES
Hmm, probably still too obfuscated.
> realize that was involved). Its also not obviously useful.
It would be if you accidentally added a trailing ':' to every line of /etc/passwd.
I admit that it's getting a little far-fetched. It's hard to find valid reasons
to use chop, apart from poetic ones.
Ben
--
Benjamin Holzman ECNvantage Corp.
Chief Technical Officer 295 Park Avenue S., Suite 7C
(212) 358-0436 : [EMAIL PROTECTED] New York, NY, 10010
$ perl -le 'print join $" ,reverse map ucfirst ,qw{ hacker perl another just}'