Bear in mind that you might get bitten in longer programs if you don't actually localise your local lexically.
{ local $/ = undef; my $names = <DATA>; } #$/ is back to our original record separator #(which you can use in the regexp if you want) e.g. if ( $names =~ m|First: (\w+)$/Second: (\w+)$/Third: (\w+)|s ) { .... }
In reply to Re: slurping (matching \n)
by maa
in thread slurping (matching \n)
by GaijinPunch
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |