#!/usr/local/bin/perl -w #use strict; print "Conent-type: text/plain;\n\n"; $ENV{PATH} = "/usr/local/bin:/usr/bin:/bin"; print "This file demonstrates the differences amongst the quote characters\n\n"; my $output = generate_page(); print $output; print "\nThis is the output of the program\n\n"; eval ("sub main {$output}"); main(); sub generate_page { my $output = <<'PAGE'; my ($first, $second, $command); $first = 34; $second = "Hello"; $command = "date"; print "\t\$first = $first\n\t\$second = $second\n"; print '\t\$first = $first\n\t\$second = $second\n'; print "\n"; print "date = ",`$command`,"\n"; PAGE return $output; }