You could also undef the separator and match globally ...Be aware that the code given will globally alter the $/ package variable (see perlvar).
A more 'idiomatic' way to slurp the contents of a file without globally changing $/ (if you do not use the File::Slurp module or an equivalent) is with the statement
ormy $file_contents = do { local $/; <$file_handle> };
my $file_contents = do { local $/; <FILEHANDLE> };
In reply to Re^2: multi-line parsing
by AnomalousMonk
in thread multi-line parsing
by amit223
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |