#!/usr/bin/perl # For obvious reasons, make sure the call to this script is the last # thing in your HTML file. print "\n\n"; my $file = shift @ARGV; my $contents = &slurp_file ($file); print "$contents"; sub slurp_file () { my $filename = shift || die ("no filename passed to slurp_file()"); my $retstr; open (SLURPEE, "<${filename}") or die ("unable to open $filename ($!)"); my $saved_sep = $/; undef $/; $retstr = <SLURPEE>; $/ = $saved_sep; close (SLURPEE); return $retstr; }