in reply to Regular Expression Tweaking
{ local $/ = ""; # two or more newlines in a row @stanzas = <POEM>; } # or { local $/ = "\n\n"; # two newlines in a row @chunks = <POEM>; # you might not get the same results }
_____________________________________________________
Jeff[japhy]Pinyan:
Perl,
regex,
and perl
hacker, who'd like a (from-home) job
s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;
|
|---|