- or download this
my $content;
{
...
open my $fh, $_[0] or die "Can't open $_[0]: $!";
$content = <$fh>;
}
- or download this
sub slurp {
local $/ = undef;
...
}
my $content = slurp('filename');
print $$content;
- or download this
use Slurp;
my $content = slurp('filename');