slurp($file)

Return content of the file $file. Die if the file is not readable.

An alternative implementation would be

sub slurp ($) { open my $fh, shift or die $!; local $/; <$fh> }

but this probably won't work with very old perls.