SPUG: 0 == undef

Adrian Hands AEH at akc.org
Wed Apr 7 13:38:58 CDT 2004

if ("$Test1" eq "$Test2") {print "Crap!\n"}

>>> "Peter Darley" <pdarley at kinesis-cem.com> 04/07/04 02:26PM >>>
	I'm wondering if there's any way to get 0 to not equal undef.  When I do:

my ($Test1, $Test2) = 0, undef;
if ($Test1 == $Test2) {print "Crap!\n"}
else {print "OK\n"}

	I find out that 0==undef.
	I'm also wondering what the thinking here is?
Peter Darley

Seattle Perl Users Group Mailing List  
POST TO: spug-list at mail.pm.org  http://spugwiki.perlocity.org 
ACCOUNT CONFIG: http://mail.pm.org/mailman/listinfo/spug-list 
MEETINGS: 3rd Tuesdays, Location Unknown
WEB PAGE: http://www.seattleperl.org

More information about the spug-list mailing list