in reply to Checking the value of an undefined value
You're looking for defined. Examples:
defined $num or $num = 1; $num = 1 if ! defined $num; [download]
In Perl 5.10, there's a // operator for testing if something is defined.
$num // $num = 1; $num //= 1; [download]