Greetings,
I am trying to figure out how to loop through a namespace.
For example:
URL: http://path/to/test.pl?name=nick&hair=brown
Contains:
Code:
#!/usr/bin/perl
use CGI;
$query = new CGI;
$query->import_names("FORM");
print "Content-type: text/plain\n\n";
while(($key,$value)=each(%FORM::)){
print "$key\n";
print "$value\n";
}
Returns:
name
*FORM::name
hair
*FORM::hair
What I was really hoping for was:
name
nick
hair
brown
I would prefer to utilize the namespace (FORM) since it's already establish in the script and part of the bigger picture.
Hopefully you can provide me with some advice on how to proceed.
Thanks,
|