use File::Stream::Improved; $/ = qr/regex/; my @records = ; # where HANDLE might also be $handle