in reply to check undef

Use the defined function to check if something is (not) undef.

In perl-5.10 and later you can also use the smart-match operator:

if ($WCkey ~~ undef && $SCeky ~~ undef && ... ) { }

Replies are listed 'Best First'.
Re^2: check undef
by srikrishnan (Beadle) on Jun 23, 2009 at 09:12 UTC
    why dont you try something like below if (! defined $WCkey) cheers srikrishnan
      If I try that I get
      Semicolon seems to be missing at 2 line 4. syntax error at 2 line 5, next token ??? Execution of 2 aborted due to compilation errors.
      Just kidding :D code tags intended for code/data/error messages