> If there is a better way I am very interested in learning it. I am a
> very basic programmer.
Here are some common early pointers.
> # Take the C:\whatever junk or the /something/somthing out of it and
> keep just the filename
> if ($filePath =~ /([^\/\\]+)$/)
You'll have problems here with non-windows boxes, that sent path
information as /home/swiftone/file.txt as opposed to C:\WINDOWS\FILE.TXT
> my $fileName = $1;
Checking to make sure there was a match is a good practice, well done.
> # Open the file to
> if (open(FILE,">$writeFile"))
Ditto for checking the return code.
....
> else
> {
> return 0;
> }
As a web process, you could try reporting errors. A:
warn "Could not open $writeFile: $!";
could give you very valuable information. Using the CGI::Carp module
will give you a nicely formatted error message.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]