kickinpretty
Technical User
hi
i have a perl script that when initiated writes to a specific file, however i need to modify this so that the file it writes to is user defined ie...file path passed via a variable from some remote client..and then stored on the server.
Here is my perl script...
#!/usr/bin/perl
require "subparseform.lib";
&Parse_Form;
$v1 = $formdata{'v1'};
@New = ("v1=$v1"
;
open (LOG, ">/var/ || &ErrorMessage;
print LOG "@New";
close (LOG);
print "Content-type: text/html\n\n";
print "status=Success - Your database has beed updated. Please reload the data to check updates";
sub ErrorMessage {
print "Content-type: text/html\n\n";
print "status=Connection Failed...Please email full details to serversupport@myserver.com";
exit;
}
Any help with this would be cool....open log is the path to my text file..this is what i need to be user defined..ie some user wants to create and write to a new text file called text2.txt...
i have a perl script that when initiated writes to a specific file, however i need to modify this so that the file it writes to is user defined ie...file path passed via a variable from some remote client..and then stored on the server.
Here is my perl script...
#!/usr/bin/perl
require "subparseform.lib";
&Parse_Form;
$v1 = $formdata{'v1'};
@New = ("v1=$v1"
open (LOG, ">/var/ || &ErrorMessage;
print LOG "@New";
close (LOG);
print "Content-type: text/html\n\n";
print "status=Success - Your database has beed updated. Please reload the data to check updates";
sub ErrorMessage {
print "Content-type: text/html\n\n";
print "status=Connection Failed...Please email full details to serversupport@myserver.com";
exit;
}
Any help with this would be cool....open log is the path to my text file..this is what i need to be user defined..ie some user wants to create and write to a new text file called text2.txt...