if (undef != 0) {#in number context, undef evaluates to 0, and we know "0 != 0" does not stand. print "pg is wrong!"; } else { print "pg is right!"; } #### if (undef ne "") {#string context print "pg is wrong!"; } else { print "pg is right!"; } #### my $a;