Subject: | add 'binmode' option to slurp() method |
I wish to slurp a binary file (such as PNG image) like this:
use Path::Class;
my $png = file('foo.png');
my $content = $png->slurp(binmode => 1);
Instead of:
use Path::Class;
my $png = file('foo.png');
my $fh = $file->openr();
$fh->binmode();
local $/;
my $content = <$fh>;
I think it is useful on Windows.