⭐ in reply to How do I split a file into an array using blank lines as delimiter
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
|
|---|