Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: A Warning Issue!

by thezip (Vicar)
on Feb 19, 2008 at 16:38 UTC ( #668833=note: print w/replies, xml ) Need Help??


in reply to A Warning Issue!

Since you've explicitly initialized a few of the variables, then only the remaining ones are the potential causes for the warnings, namely $_->{ TEST34 } and $_->{ TEST33 }.

Perhaps you might want to check their values prior to the IF statement to ensure they are what you think they are. If either is not initialized, then just don't execute the IF statement.

BTW, that's a fairly complicated piece of logic there. Maybe you might want to break it up into smaller, logical chunks? That way, you'll have a better idea of what you were trying to do six months down the road.


Your wish is my commandline.

Replies are listed 'Best First'.
Re^2: A Warning Issue!
by Anonymous Monk on Feb 19, 2008 at 16:44 UTC
    That's why I am confused, I my head the IF should be doing this check, how would I check otherwise?

      At the risk of adding more bulk to your code, try this check first, as well as one for $_-> { TEST34) }.

      if ($_->{ TEST33 } ) { <your previous code here ...> }

      Your wish is my commandline.
        Just don't forget the implicit assumption here that $_->{TEST33} will never be zero. If zero is a valid (or even possible) value, you probably want to test if (defined $_->{TEST33}) instead.
        I could use something like that for all that apply as well, right?

        if(defined $_->{ TEST33 } && $_->{ TEST34 } && $_->{ TESTX33 }) { <Previous code here ...> }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://668833]
help
Chatterbox?
[stevieb]: daughter arrived from SF with Gandalf the bunny for his first international flight. Very wonderful Friday... like the holidays came early :)

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (3)
As of 2016-12-03 04:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (52 votes). Check out past polls.