in reply to •Re: Puzzling CGI behavior
in thread Puzzling CGI behavior

You get exactly the same result if you do this:
my %webobj = ( 'template' => , 'minscale' => 2 );
because there is no param(template), so it's like you said 'template' => nothing, comma, minscale, I guess.

I suppose this is somehow different to doing it with an undefined variable -- that way you'd get undef as the value for 'template'.

I know it's daggy and old-fashioned, but if I'm in a hurry, I just do this:

CGI::ReadParse();
which puts everything into a hash called %in. That was only included in CGI.pm for backward, perl 4/cgi-lib compatibility, but I like it. It does what you're trying to do here, right?
--
“Every bit of code is either naturally related to the problem at hand, or else it's an accidental side effect of the fact that you happened to solve the problem using a digital computer.”
M-J D

Replies are listed 'Best First'.
Re: Re: •Re: Puzzling CGI behavior
by Gilimanjaro (Hermit) on Jan 30, 2003 at 09:51 UTC
    I often do:

    use CGI qw(:cgi-lib); my $form = Vars;

    Gives you a tied hash-reference to all parameters, also allowing you to change the submitted parameters...