CPU: Perl, Fall 2005 Perl, Week 2: Arrays, Hashes, Control Structures #15

Booleans

  1. If it's a number, 0 is false, everything else is true
  2. If it's a string, empty ('') is false, everything else is true
  3. If it's another kind of scalar, turn it into a number or string and go to step 1
Copyright © 2005 Ian Langworth