in reply to How do I read an entire file into a string?
my $file = 'sample.txt'; { local *FH; -f FH and sysread FH, my $file, -s FH; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Answer: How do I read an entire file into a string?
by cadphile (Beadle) on Aug 11, 2014 at 21:09 UTC |