'defined' would be the keyword you are looking for....<br><br>if (defined $product) ...<br>if (defined $ARGV[0]) ...<br><br><div><span class="gmail_quote">On 10/17/06, <b class="gmail_sendername">CaptNemo</b> <<a href="mailto:CaptNemo@austin.rr.com">
CaptNemo@austin.rr.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Why is it so hard to check for null values in perl!?!?!
<br><br><br>Two situations:<br><br><br>1) checking is a variable is empty:<br><br> IF ($product eq "")...<br> IF ($product <> "")...<br> IF ($product ne "")...<br> IF ($product != "")...
<br> IF ($product eq NULL)...<br> IF ($product <> NULL)...<br> IF ($product ne NULL)...<br> IF ($product != NULL)...<br><br><br>2) checking to see if command line args were present:<br><br>
IF ($ARGV[0] eq "")...<br> IF ($ARGV[0] <> "")...<br> IF ($ARGV[0] ne "")...<br> IF ($ARGV[0] != "")...<br> IF ($ARGV[0] eq NULL)...<br> IF ($ARGV[0] <> NULL)...
<br> IF ($ARGV[0] ne NULL)...<br> IF ($ARGV[0] != NULL)...<br><br> ...none seem to work. HOW do you check for NULL values!?!?<br><br>_______________________________________________<br>Austin mailing list
<br><a href="mailto:Austin@pm.org">Austin@pm.org</a><br><a href="http://mail.pm.org/mailman/listinfo/austin">http://mail.pm.org/mailman/listinfo/austin</a><br></blockquote></div><br><br clear="all"><br>-- <br>Pat Ludwig <
<a href="mailto:havoc@boldo.com">havoc@boldo.com</a>><br>AIM: HaVoCPaT<br><br>"Whoever fights monsters should see to it that in the process he does not become a monster. And when you look long into an abyss, the abyss also looks into you."
<br> Friedrich Nietzsche, Beyond Good and Evil 89 (Walter Kaufmann trans., Vintage Books 1966) (1886).