%a = ( A => 1, ); print 'A' if not exists $a{'A'}; # prints nothing print 'B' if not exists $a{'B'}; # prints B
Try use warnings; to see if you're trying to print undef, and like pg suggested, make sure the // actually matched. You could also give us a sample of IN and IN2 which doesn't provide the expected output.
In reply to Re^5: hash question
by ikegami
in thread hash question
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |