Problems? Is your data what you think it is? | |
PerlMonks |
Re: undef and empty variablesby tilly (Archbishop) |
on Jan 19, 2011 at 16:57 UTC ( [id://883160]=note: print w/replies, xml ) | Need Help?? |
If you are not using warnings, then indeed undef will be translated into "". However you should use warnings because it will catch other things, and so should include the defined check to avoid that warning. Furthermore think carefully about your data. It could be that "" is a valid value. Therefore my natural inclination would be to keep "" as a valid value, and map undef to null.
In Section
Seekers of Perl Wisdom
|
|