in reply to Re: check undef
in thread check undef

Sorry about my original post, Now the problem is, I know defined and how to use it but the problem here is, if those variable are "undef" do some thing else, if (defined($key)) { .... } but is there any thing like this if (undefined($key)) { .... } Any suggestion???

Replies are listed 'Best First'.
Re^3: check undef
by Corion (Patriarch) on Jun 23, 2009 at 08:34 UTC

    You have not programmed much, have you? The perlop manpage does not hide how to invert logic expressions. See logical not for how to execute something if a condition is not true.

    For futher reading, I recommend looking at Truth Tables and potentially then Boolean Logic.