UPDATE: changed the $/ assignment to local.local $/ = undef; #slurp entire file my $string; open (my $FH, '<', $file1); $string = <$FH>; close $FH; open (my $FH, '<', $file2); $string .= <$FH>; #notice the concatenation close $FH;
Stop saying 'script'. Stop saying 'line-noise'.
We have nothing to lose but our metaphors.
In reply to Re: Treating the file contents of a text file as a string
by Erez
in thread Treating the file contents of a text file as a string
by adaykin31
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |