in reply to CGI.pm accepting a 0 as a value, not null

my $first = param('first'); $first = 'notentered' unless defined $first;

MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
** The third rule of perl club is a statement of fact: pod is sexy.

Replies are listed 'Best First'.
Re^2: CGI.pm accepting a 0 as a value, not null
by ecuguru (Monk) on Oct 11, 2005 at 06:41 UTC
    got it, one lined
    my $first = (defined param('first'))? param('first'):'notentered';
    I used to have Defined in my old code! dunno wtf i didn't think of using it also.
    thanks!