in reply to Treating the file contents of a text file as a string
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Treating the file contents of a text file as a string
by grinder (Bishop) on May 22, 2008 at 08:00 UTC | |
|
Re^2: Treating the file contents of a text file as a string
by Burak (Chaplain) on May 22, 2008 at 08:03 UTC |