in reply to undef $/ to null
A common Perl idiom for this is (the change to $/ is localized to the do block):
There is even a module: File::Slurp.my $filename = 'file.name'; open my $fh '<', $filename or die "opening $filename: $!"; my $contents = do { local $/; <$fh> };
|
|---|