Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Getting rid of an uninitialized warning

by Sandy (Curate)
on Jun 23, 2011 at 20:50 UTC ( [id://911159]=note: print w/replies, xml ) Need Help??


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...

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://911159]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2024-04-25 12:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found