in reply to Getting hash of CGI variables

Going at it from a slightly different viewpoint, perhaps it might be simpler/easier to just use CGI::Lite which provides exactly one method to get the form data =]. You simply use the object->parse_form_data and get your hash, like so:
use CGI::Lite; my $c = CGI::Lite->new(); my %form_data = $c->parse_form_data(); #or pass it GET or POST, respec +tively print keys %form_data; print "\$form_data{ $_ } = $form_data{$_}\n" for keys %form_data;

Replies are listed 'Best First'.
Re: Re: Getting hash of CGI variables
by Lori713 (Pilgrim) on Jan 23, 2004 at 13:20 UTC
    Thanks for the very clear example! We don't have CGI::Lite on our system here, but I think I'll download it via ActiveState to my PC and play with it some. I might be able to sweet-talk the SA/DBA folks to consider loading it. ;-)

    Lori

      Well, it's a pure perl module so installing is as simple as copying 'Lite.pm' in to a folder named CGI someplace in your path.