>>>>> "Roger" == Roger C Haslock <[EMAIL PROTECTED]> writes:

Roger> You have
>> foreach my $name ( $cgi->param )
>> {    print "$name\t" . $cgi->param( $name ) . "\n";
>> }

Roger> You have to be careful with CGI::param; it returns a scalar for a scalar,
Roger> and an arrayref for a list.

Not unless I've been extremely confused over the years.  In a scalar
context, it returns the "first" item, which is usually the only item,
but can be some random item if it's a multivalue parameter.  In a list
context, it returns all the items as a list.  And I just verified that
by looking at source.  Perhaps you're confusing param() with something
else?

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

Reply via email to