This is what i'm going for, but it douse not work.
I whant to create a file and folder with ver. but i'm not sure how to. any help would be cool.
This is what i have got so far.
#!/usr/bin/perl
use CGI qwstandard);
use CGI::Carp qw(warningsToBrowser fatalsToBrowser);
use strict;
print header;
print start_html("Results");
my $folder = param('folder');
my $file = param('file');
open(fileOUT, ">.../$folder/$file.html") or dienice("Can't open .../$folder/$file.html for writing: $!");
flock(fileOUT, 2);
seek(fileOUT, 0, 2);
print fileOUT "<center>~Blank~</center>\n";
print fileOUT "\n\n";
close(fileOUT);
print <<EndHTML;
<script>
window.alert("This file is blank!")
</script>
EndHTML
print end_html;
sub dienice {
my($errmsg) = @_;
print "<h2>Error</h2>\n";
print "<p>$errmsg</p>\n";
print end_html;
exit;
}
I whant to create a file and folder with ver. but i'm not sure how to. any help would be cool.
This is what i have got so far.
#!/usr/bin/perl
use CGI qwstandard);
use CGI::Carp qw(warningsToBrowser fatalsToBrowser);
use strict;
print header;
print start_html("Results");
my $folder = param('folder');
my $file = param('file');
open(fileOUT, ">.../$folder/$file.html") or dienice("Can't open .../$folder/$file.html for writing: $!");
flock(fileOUT, 2);
seek(fileOUT, 0, 2);
print fileOUT "<center>~Blank~</center>\n";
print fileOUT "\n\n";
close(fileOUT);
print <<EndHTML;
<script>
window.alert("This file is blank!")
</script>
EndHTML
print end_html;
sub dienice {
my($errmsg) = @_;
print "<h2>Error</h2>\n";
print "<p>$errmsg</p>\n";
print end_html;
exit;
}