http://www.perlmonks.org?node_id=745180


in reply to Re: Parsing multiline string line by line
in thread Parsing multiline string line by line

If you're slurping, might as well assign to an array:

$/ = undef;

open "FIN", "<raja.txt" or die "cant open :$!";
my @fin = <FIN>;
close FIN;

print for @fin;