Next Program Repair Shop 194

Boolean Context

        if (@array) {
          # the array is not empty
        }
        if (%hash) {
          # the hash is not empty
        }
        if (grep is_interesting($_), ITEMS) {
          # there was an interesting item
        }
        if (s/this/that/) {
          # the substitution was performed
        }
        if (ref $x) {
          # $x is a reference 
        }


Next Copyright © 2002 M. J. Dominus