'$name' creates the 5 character string "$","n","a","m","e". Double-quoted strings interpolate, but no need for that either. Use ->param($name)
May I also recommend that you don't declare your variables until you need them? No need to make their scope larger than needed.
#! /usr/bin/perl -w use strict; use warnings; use CGI; use CGI::Carp qw( fatalsToBrowser warningsToBrowser ); my $query = CGI->new; my $webmaster = "http://www.mysite.com/"; my @names = $query->param; my @values; foreach my $name (@names) { my $value = $query->param($name); push(@values, $value); } print "Content-Type: text/plain\r\n\r\n"; print "names @names\n\n"; print "values: @values\n\n";
In reply to Re^3: globbed variable in parse cgi form - beyond me
by ikegami
in thread globbed variable in parse cgi form - beyond me
by Don Coyote
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |