Are we talking empty string or undef here? They act differently, depending.
Normally they do, but we're talking about hash keys here. A hash key can only be a string, so any number, reference or undefined value is stringified. undef happens to stringify to the emtpy string, so $foo{+undef} and $foo{''} are the same thing.
2;0 juerd@ouranos:~$ perl -le'$foo{+undef} = "Hello, world!"; print $f +oo{""}' Hello, world!
- Yes, I reinvent wheels.
- Spam: Visit eurotraQ.
In reply to Re: Re: null keys
by Juerd
in thread null keys
by hakkr
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |