my $string = do { local @ARGV = $filename; join q{ }, grep $_ ne "\n" && chomp, <>; }; [download]
In reply to Re: read file into 1 line string by trizen in thread read file into 1 line string by Anonymous Monk