in reply to each %hash: scalar context of list (undef, undef) is false
In my opinion, after "($key, $value)" are assigned to "()" and list becomes "(undef, undef)", scalar context takes only the last element of the list, that means 2nd "undef". Am I wrong?
Compare:
$ perl -E 'say scalar ( ($a, $b) = () )' 0 $ perl -E 'say scalar ( ($a, $b) = (undef, undef) )' 2
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: each %hash: scalar context of list (undef, undef) is false
by rsFalse (Chaplain) on Nov 22, 2014 at 18:40 UTC |