> using the Perl4 cgi-lib.pl. However, I can think of no other
> legitimate use. Here's a nice,
> clean method of dealing with this:
>
> use strict;
> use CGI qw/:standard/;
> my %form_data = map { $_, get_data($_) } param;
>
> sub get_data
> {
> my $name = shift;
> my @values = param( $name );
> return @values > 1
> ? \@values
> : $values[0];
> }
That worked, thanks, but seemed to be 1/100th of a second slower than the other
method, which became distilled down to the following line, eliminating the
previous multiline and sub I was using:
$form_data{$_} = param($_) for (param());
Iterates over the form name/value pairs in param() and places them into
%form_data.
/g
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]