Perl Monk, Perl Meditation | |
PerlMonks |
Definedness of an Objectby PerlingTheUK (Hermit) |
on Mar 14, 2006 at 13:57 UTC ( [id://536577]=perlquestion: print w/replies, xml ) | Need Help?? |
PerlingTheUK has asked for the wisdom of the Perl Monks concerning the following question:
All,
I have a matcher that looks through a number of objects and returns the first that matches certain criteria or - if none are found - it returns undef. Now all I need to know is if the resulting variable is defined or not. As I expect the object to be defined, I croak if no object was found. So far the theory. Here is the code:
I do not understand why ! defined $dep_tip seems to evaluate to true. Cheers, PerlingTheUK
Considered by PerlingTheUK: Please delte as I found the error in a later line in the code.
Back to
Seekers of Perl Wisdom
|
|