0 # converts to "0" so it's false; "" # is empty string so it's false; "0.0" # not "0" or "" so it's true 0.0 # computes to 0 and is then converted to "0" so false undef # evaluates to "" so it's false -- note, you may get a warni +ng "use of uninitialized value" if you are using -w 2-3+1 # computes to 0 which is converted to "0" so it is false
In reply to What is true and false in Perl? by root
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |