http://www.perlmonks.org?node_id=911159


in reply to Getting rid of an uninitialized warning

Replace
my $c_enabling = param('enabling');
with
my $c_enabling = param('enabling') || '';
If $c_enabling can never have '0' as a valid input;

otherwise

my $c_enabling = param('enabling'); $c_enabling = '' unless defined $c_enabling;

Replies are listed 'Best First'.
Re^2: Getting rid of an uninitialized warning
by jonc (Beadle) on Jun 23, 2011 at 21:06 UTC

    Thanks a lot, that was the problem, it was aloud to have a 0 input, but I didn't know how to check that easily. I had tried the defined check, but it didn't work. I really hope this can't backfire, since I just put it everywhere...