Perl: the Markov chain saw | |
PerlMonks |
return a hash or undefby odrevet (Acolyte) |
on Aug 03, 2009 at 19:54 UTC ( [id://785538]=perlquestion: print w/replies, xml ) | Need Help?? |
odrevet has asked for the wisdom of the Perl Monks concerning the following question: It's a simple question. I've got a function that return a hash or undef if no value is found.
If the function return undef, I've got the warning "Odd number of elements in hash assignment". That's makes sense, since the hash got only one value (undef). But I need to check if the hash has values, or the application will crash if I just assum there are values and try to use it...
Back to
Seekers of Perl Wisdom
|
|