in reply to if not defined
if (!defined $pname && !defined $policy_ur && !defined $odate) [download]
The above condition is not equivalent to what you posted earlier.
NOT( DEFINED(A) AND DEFINED(B) AND DEFINED(C) ... ) [download]
( NOT DEFINED(A) ) OR ( NOT DEFINED(B) ) OR ( NOT DEFINED(C) ) ... [download]
That's De Morgan's theorem.
TGI says moo