The secret is to change $/ to the empty string. This will put Perl into 'paragraph mode', where the input record separator is one or more blank lines. Something like this:
#!/usr/bin/perl -w use strict; my @array; { local $/ = ''; @array = <DATA>; } print $array[0]; __END__ blah blah blah blah blahblahblalh oh yeah interesteing no no no nonnono yes yes
In reply to Re: How do I split a file into an array using blank lines as delimiter
by davorg
in thread How do I split a file into an array using blank lines as delimiter
by aaAzhyd
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |