#!/usr/local/bin/perl
use CGI;
use CGI::Carp "fatalsToBrowser";
use strict;
my $o = new CGI;
print $o->header,
$o->start_html,'<p>';
unless (mkdir JUNK, 777) { die "Failed mkdir, $!\n"; }
open(OPF,">./JUNK/SomeFile.txt") or die "Failed open, $!\n";
print OPF "Content for new file\n";
close OPF;
print 'Successfully wrote to new file</p>',
$o->end_html;