RonAckerman
ISP
I need to add to a script a line that will copy a file from the cgi-bin directory to a directory that has been created by the script. Can someone help with this?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
#!/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;