$seen->{ ref($_) ? $_ : \$_} = undef
You are aware that ref can return a false value even if its argument is a reference?
$ perl -wle 'print ref bless [] => 0' 0
You ought to check for definedness, which is easy in 5.8.1 with the defined-or patch:
$seen -> {ref () // \$_} = undef;
Abigail
In reply to Re: Recursive map Design Questions
by Abigail-II
in thread Recursive map Design Questions
by bsb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |