in reply to strip until blank line

A more idiomatic way of doing this:
while (<INPUT>) { next if (1 .. /^$/); # skip header # do something with body }

Replies are listed 'Best First'.
Re: Re: strip until blank line
by snax (Hermit) on Nov 23, 2000 at 15:26 UTC
    Should this regex include whitespace?
    while (<INPUT>) { next if (1 .. /^\s*$/); # yada yada }
    Also, your example reminds me of some kind of tutorial or perldoc reference -- is that right? If so, could you point me to it? This is a slick construction.

      Yah, it should. I think this behavior is documented in perlop.. look for the "range operator" (..) in a scalar context.