# This is a helper to slurp up files, I could have just used File::Slurp sub slurp($) { my $filename = shift; # Slurp up the contents of the given filename open my $slurpy, '<', $file or die "Cannot open $file: $!"; return do { local $/; <$slurpy> }; }