warnings will complain though:
perl -we'$b=undef;$a{$b}=1;print$a{""}' Use of uninitialized value in hash element at -e line 1. 1
update: strictly speaking a hash key (for a normal hash) can't be undef, a reference, an object or anything but a plain string, and using anything as a hash key that isn't a string will use the stringified form. Which explains the behaviour in TedYoung's example.
In reply to Re: undef as a key in a hash.
by Joost
in thread undef as a key in a hash.
by fenLisesi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |