|Perl Monk, Perl Meditation|
How to assign string "0" in short circuitby nikhil.patil (Sexton)
|on Feb 04, 2008 at 12:08 UTC||Need Help??|
nikhil.patil has asked for the
wisdom of the Perl Monks concerning the following question:
In the following scenario:
How do I make sure that a string value "0" is assigned to $var when the argument passed to the function is 0?
Currently, if 0 is passed to the function, it assigns "No argument" to the variable. I want "No argument" to be assigned only if there was no argument passed in the call to the function. Can I not use short circuit to do this??
Thanks in advance!