You can't (easily) use symbolic references with lexical variables. You must use package variables instead.
With that said, don't use symbolic references for this: use a hash or real references.
(As well, $#whatever doesn't evaluate to the number of elements of @whatever in scalar context; it evaluates to the index of the final element of @whatever. Use my $ar_count = @whatever; instead.)
In reply to Re: simple symbolic reference Q
by chromatic
in thread simple symbolic reference Q
by perl-diddler
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |