Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Getting rid of an uninitialized warning

by Sandy (Curate)
on Jun 23, 2011 at 20:50 UTC ( #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;


Comment on Re: Getting rid of an uninitialized warning
Select or Download Code
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
Node Status?
node history
Node Type: note [id://911159]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (7)
As of 2014-10-23 02:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (123 votes), past polls