This will do the trick:
Update:my $contents; { local $/; open (FILE, $txt_file) || die "Cannot open $txt_file:$!"; $contents = <FILE> }
--
Cheers, Joe
In reply to Re: Putting file contents into a scalar
by joe++
in thread Putting file contents into a scalar
by ByteOrNybble
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |