Help for this page

Select Code to Download


  1. or download this
    my %hash = ("a" => undef, "b" => 0, "c" => 2);
    
    ...
        print "the value of $key is defined\n" if (defined $hash{$key});
        print "the value for $key is true" if ($hash{$key});
    }
    
  2. or download this
    a exists
    b exists
    ...
    c exists
    the value of c is defined
    the value for c is true