in reply to Re^5: scanning hash
in thread scanning hash
To illustrate the point:
$ perl -le '$a = $b = "foo"; print \$a eq \$b ? "true" : "false"' false
The strings are identical, but they're two different strings. The string representations of references to them differ. Are they equal or not? This is a question of semantics that you can't answer without additional context.
Indeed, if we just accept the string representation as the universal measure of equality, then ambrus is right: the empty string and undef are equal, and thus all of my arguing has been moot. However, experience tells me it is a prudent bet to assume that in most situations, undef needs to be treated differently from an empty string.
Makeshifts last the longest.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: scanning hash
by ysth (Canon) on Aug 02, 2004 at 20:20 UTC | |
by Aristotle (Chancellor) on Aug 02, 2004 at 20:37 UTC |