Phoenix.pm: New meeting place
David Sinck
sinck at ip100.starwarz.org
Thu Sep 2 10:28:01 CDT 1999
\_ 1. This one takes all the parameters from your HTML form
\_ input, and makes local variables of the same names inside
\_ your script.
\_ [...]
\_ use CGI;
\_ my $q=new CGI;
\_ foreach ($q->param()) {
\_ ${$_} = $q->param($_);
\_ }
Is it just me, or does this replicate the effort of
$q->import_names('main');
Just curious.
Not only is there more than one way to do it, there's probably too
many. :-)
FWIW, the cool thing Shay posted on sorting by size is classically known
as the Schwartzian Transform, mod'd slightly to sort by size.
Benchmarking put it faster than other 'create a key foreach data, sort
key, extract data' methods. (So said Randal of Transform fame in a
presentation I was at....)
David
More information about the Phoenix-pm
mailing list