Front page | perl.perl6.language |
Postings from August 2000
Re: Things to remove
From:
Russ Allbery
Date:
August 8, 2000 11:37
Subject:
Re: Things to remove
Message ID:
yl66pboazt.fsf@windlord.stanford.edu
Bennett Todd <bet@rahul.net> writes:
> The poster you are replying to said "I use this in one-liners, and it's
> _dead_ handy."; that conjures up the idioms like
> perl -nle 'print if 1.. ?^$?' [filename]
> which barfs out only the header; replace "if" with "unless" and it
> chops the head off.
Why do you need one-time matching here? /^$/ should work fine.
I've very rarely found cases where ?? was useful and // didn't work, and
never in regular code.
--
Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/>