I have the following piece of code in my program:
$val = chr(someFunction()); if($val == " ") { #do something } elsif($val == 0) { #do something else }
But whenever 0 is passed to $val, the if part executes instead of the elsif which I expect to get executed. How can I fix this?
In reply to How can I differentiate between 0 and whitespace in Perl? by boom
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |