DrWhy has asked for the wisdom of the Perl Monks concerning the following question:
On my machine (Fedora 2.6.7, perl 5.8.5) the following one liner prints true:
perl -e 'if (undef() eq undef()) {print "true" }else{ print "false"}'
This variation (unexpectedly) prints nothing:
perl -ew 'if (undef() eq undef()) {print "true" }else{ print "false"}'
Do any of you brothers (be you either male or female) have a clue as to why this difference in behavior?
--DrWhy
"If God had meant for us to think for ourselves he would have given us brains. Oh, wait..."
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Unexpected effect of -w with undef
by Aristotle (Chancellor) on Dec 22, 2004 at 16:25 UTC | |
by DrWhy (Chaplain) on Dec 22, 2004 at 16:37 UTC | |
by Aristotle (Chancellor) on Dec 22, 2004 at 16:41 UTC | |
by gellyfish (Monsignor) on Dec 22, 2004 at 16:43 UTC | |
by merlyn (Sage) on Dec 22, 2004 at 16:45 UTC | |
by Aristotle (Chancellor) on Dec 22, 2004 at 16:45 UTC | |
Re: Unexpected effect of -w with undef
by bgreenlee (Friar) on Dec 22, 2004 at 16:30 UTC | |
by Joost (Canon) on Dec 22, 2004 at 21:44 UTC | |
Re: Unexpected effect of -w with undef
by Stevie-O (Friar) on Dec 22, 2004 at 16:29 UTC | |
Re: Unexpected effect of -w with undef
by gaal (Parson) on Dec 22, 2004 at 17:10 UTC |
Back to
Seekers of Perl Wisdom