Re: help slurping a file



Hello,

My question is, why can't I slurp in the entire file?

Because you're fiddling with things that ought not be fiddled with ;p (IE $\)


instead:

use File::Slurp;

my @lines = read_file($file);

or you can use Perl 6's slurp() via a Perl6 module (perl6::Slurp maybe ???) see cpan for details.
.