You're looking for defined. Examples:
defined $num or $num = 1; $num = 1 if ! defined $num;
In Perl 5.10, there's a // operator for testing if something is defined.
$num // $num = 1; $num //= 1;
In reply to Re: Checking the value of an undefined value
by kyle
in thread Checking the value of an undefined value
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |