#!/usr/local/bin/perl print "Content-Type: text/html\n\n"; $datafile = "write2file.dat"; open(FILE,">$datafile") or webdie("Cannot open $datafile for writing: $!"); print FILE "Check, check...is this mic on?\n"; close FILE; # now tell the browser what you did print <

$datafile was written

END exit 0; sub webdie { print "\n"; print "\n"; print "

Error: $_[0]

\n"; print "\n"; print "\n"; exit 1; }