use File::Slurp qw(read_file); my @lines = read_file('/path/file',chomp=>1);