I am writing a lost and found program that runs on a website and calls a PERL program to process the information into a data base. My problem is that when I click submit the PERL program doesn't run. Before I reloaded my computer it use to run, but I had the wrong code so it didn't do what I wanted. Now I think I have the right code but it won't run. If I double click the .pl file it runs and creates a .txt file with new lines in it. So I know PERL runs on my computer. As I said I think I am asking in the wrong forums but I don't know who or what to ask to get the help I need.
Here is the HTML form tag
<form id="found" name="found" action="lost.pl" enctype="multipart/form-data" method="post">Here is what I have so far for my PERL program code. I am not asking for help on the code for my program, as I am using this project to better learn PERL. I just need to know why it isn't running
#!/usr/bin/perl # Get Form Variables sub parse_form { read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); if (length($buffer) < 5) { $buffer = $ENV{QUERY_STRING}; } @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $FORM{$name} = $value; } } #end parse_form &parse_form; open (LOST, ">>lost.txt")or die "Cannot open lost.txt"; foreach $key (keys %FORM){ print LOST "$key $FORM{$key}+"; } print LOST "\n";
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |