csuhockey3 has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monks,
I have a very old form that I was asked to touch up and add some functionality to. I have everything all taken care of except writing the form data to a flat file. I have done this many many times in the past but I can't seem to figure out why this one isn't working. Here is a snippet:
Thanks Monks!
update: code typo
I have a very old form that I was asked to touch up and add some functionality to. I have everything all taken care of except writing the form data to a flat file. I have done this many many times in the past but I can't seem to figure out why this one isn't working. Here is a snippet:
When I run the script from the command line (off-line mode), it creates/writes to flatfile.data. When I run from the form (on submit), it does not create or write to flatfile.data, however a confrimation email is sent and everything else is fine. Permissions are correct and I get no warnings or errors. Any ideas?... $FieldName = $cgi->param('Field Name'); ... sub flatFile{ open(FLATFILE, ">> /tmp/flatfile.data") or die $!; #will loop through and tab params, just for testing print FLATFILE $FieldName; close (FLATFILE); }
Thanks Monks!
update: code typo
Back to
Seekers of Perl Wisdom