Perl Elements to Avoid - Perl Beginners' Site
One can see several bad ways to read a file into memory in Perl. Among them are: # Not portable and suffers from possible # shell code injection. my $contents = `cat $filename`; # Wasteful of CPU and memory: my $contents = join("", ); # Even more so: my ....