in reply to variables not posting?
Always, always, always
I think the following modified code may help
Hope this helps
Then USEFUL error messages are output#!/usr/bin/perl -w use strict;
I think the following modified code may help
Note the declaration of my %fields before the loop#!/usr/bin/perl -w use strict; use CGI::Carp qw(fatalsToBrowser); read (STDIN,my($temp), $ENV{'CONTENT_LENGTH'}); my (@pairs) =split(/&/,$temp); my($item) = ""; my %fields; foreach $item(@pairs) { my($key,$content) =split (/=/, $item, 2); $content=~tr/+/ /; $content=~s/%(..)/pack("c",hex($1))/ge; $fields{$key}=$content; } print "Content-type: text/html\n\n"; print "<HTML>\n"; print "<HEAD>\n"; print "<TITLE>This is a test of the stuffy perl network</TITLE>\n"; print "</HEAD>\n"; print "<BODY>\n"; print "$fields{tool}\n"; print "$fields{month}\n"; print "$fields{date}, $fields{month}\n"; print "</BODY>\n</HTML>";
Hope this helps
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: variables not posting?
by stuffy (Monk) on May 03, 2001 at 11:19 UTC | |
by epoptai (Curate) on May 03, 2001 at 11:38 UTC | |
by busunsl (Vicar) on May 03, 2001 at 11:39 UTC |
In Section
Seekers of Perl Wisdom