sub sub3 { open FILE, 'yourfile' or die $!; binmode FILE; my @lines = split $/, do{ local $/; ; }; close FILE or warn $!; }