Use the 'local' keyword
my $filename = 'foo.txt'; open my $fh, '<', $filename or die; my $content; { local $/ = undef; $content = <$fh>; } # $content contains the full file content now.
Cheers, Flo
In reply to Re: switching default line terminator?
by rafl
in thread switching default line terminator?
by rmexico
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |