Feb 1, 2000, 9:09 AM
Post #3 of 3
That's because the input record delimeter (held in $/) is a newline by default.
Re: problems with the texarea html tag
[In reply to]
Perl, by default, considers each line in a file a record. So to slurp the entire contents of the file into a scalar (that is, to define the record as the complete multiline file), you'll first need to clear the default record delimeter.
<BLOCKQUOTE><font size="1" face="Arial,Helvetica,sans serif">code:</font><HR>
open (FILE, "temp.txt");
$txt = <FILE>;
$txt will now hold the entire contents of <FILE>