in reply to making a hash from cgi parameters

See if this works:

@IN = params(); foreach $field (@IN){ DATA{$field} = param($field); }

I think this creates a hash, %DATA. So, if you have a name of "name", to get that value it's $DATA{name}. Red------

Replies are listed 'Best First'.
Re: You want Params Into a Hash Called Data?
by davorg (Chancellor) on May 25, 2001 at 01:50 UTC

    You missed a $ off the front of $DATA{$field} which would prevent this code from compiling.

    Even with that fix, it's still a bad idea as it breaks on multi-valued CGI parameters. See (Ovid) Re(2): use CGI for more details.

    --
    <http://www.dave.org.uk>

    "Perl makes the fun jobs fun
    and the boring jobs bearable" - me

      That should be param(), not params(). Red------