Pathologically Eclectic Rubbish Lister | |
PerlMonks |
ternary operatorby kevind0718 (Scribe) |
on Dec 16, 2008 at 23:13 UTC ( [id://730761]=perlquestion: print w/replies, xml ) | Need Help?? |
kevind0718 has asked for the wisdom of the Perl Monks concerning the following question:
Hello kind and Wise Monks: I have a bit of simple code and do not understand why it does not behave as I expect. $col->26 is expected to contain a string which is a date. I.e. '20090711' If it does not contain a date it contains a zero. I.e. 0 Not what I would like, but I have to deal with it. If $col->26 contains '20090711' I get $col->26:20090711: from the above code. If $col->26 contains '0' I get $col->26:0: from the above code. Not what I expected. I want to get an empty string as in ''. So the question is, what am I doing wrong? Thanks for your assistance. KD
Back to
Seekers of Perl Wisdom
|
|