in reply to Taking Variable from Form Entry Using CGI
Then you should dump all your environment variables and what you read from STDIN into some file and examine it.
As for POST, I doubt that this works:
# Split the name-value pairs @pairs = split(/&/, $query_string);
Otherwise, just use CGI and have that module give you the content of the textarea:
Cleaner code, less hassle.#!/usr/local/bin/perl use CGI; use strict; my $q = CGI->new; print $q->header; my $text = $q->param('comments'); my $words = scalar(split (/ /, $text)); #Give output print <<END; <html><head> <title>Guest book Result</title> <body> <h1 align="center">Guest book Results</h1> <br> Comments : $text <br> Words: $words </body> </html> END
cheers,
--shmem
_($_=" "x(1<<5)."?\n".q·/)Oo. G°\ /
/\_¯/(q /
---------------------------- \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Taking Variable from Form Entry Using CGI
by sdslrn123 (Novice) on Jul 02, 2006 at 15:17 UTC | |
by shmem (Chancellor) on Jul 02, 2006 at 15:36 UTC | |
by davido (Cardinal) on Jul 02, 2006 at 16:29 UTC |