Lingua::Pangram

Tony Bowden tony at kasei.com
Wed Jan 23 05:47:57 CST 2002


On Wed, Jan 23, 2002 at 11:10:18AM +0000, Andrew Wilson wrote:
> it's really bad to test for 1 and 0 being returned when you really mean 
> true and false.  

The classic case, of course, being -s

Compare:

  if (-s $file) {
    print "File is not empty"
  }

with

  if (-s $file == 1) {
    print "File is not empty"
  }

Tony




More information about the Belfast-pm mailing list