use strict; use warnings; my($infile, $outfile) = @ARGV; open(IN, "$infile"); open(OUT, ">$outfile"); { blah } print_some_stuff(); sub print_some_stuff { print OUT <<"EOF"; This is a test, it is only a test. In the event of an emergency, run around in a panic. EOF }