in reply to Common Perl Pitfalls
The solution: redefine $/ right after your slurp:No. That's just another potential problem. The solution is:
Or:my $slurp; {local $/; $slurp = <INPUTFILE>};
Or even:my $slurp = do {local(@ARGV, $/) = "inputfile"; <>};
my $slurp = `cat inputfile`;
In Section
Meditations