pccenterllc has asked for the wisdom of the Perl Monks concerning the following question:
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";
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: I think this is the wrong forums but I am not sure where to ask
by linuxer (Curate) on Jul 19, 2010 at 14:41 UTC | |
Re: I think this is the wrong forums but I am not sure where to ask
by ikegami (Patriarch) on Jul 19, 2010 at 14:50 UTC | |
Re: I think this is the wrong forums but I am not sure where to ask
by SuicideJunkie (Vicar) on Jul 19, 2010 at 14:46 UTC | |
Re: I think this is the wrong forums but I am not sure where to ask
by roboticus (Chancellor) on Jul 19, 2010 at 14:42 UTC | |
Re: I think this is the wrong forums but I am not sure where to ask
by Anonymous Monk on Jul 19, 2010 at 14:39 UTC | |
Re: I think this is the wrong forums but I am not sure where to ask
by pccenterllc (Initiate) on Jul 19, 2010 at 16:40 UTC | |
by StommePoes (Scribe) on Jul 20, 2010 at 13:15 UTC |