in reply to Perl 5.10.1 versus 5.8.8 with $#{}

It looks to me that this is a feature that was deprecated and removed - it works in v5.8.5 built for x86_64-linux-thread-multi but fails in v5.8.9 built for MSWin32-x86-multi-thread. The usual way of achieving this is only derefencing once, using $#{$array_ref} in parallel to using $#array to get the maximum index of @array. This is discussed a little in perldsc.

And try not to use $a or $b as variables, since they are magic variables used for sorting. See $a and $b in perlvar.

Replies are listed 'Best First'.
Re^2: Perl 5.10.1 versus 5.8.8 with $#{}
by dirko.van.schalkwyk (Initiate) on Feb 01, 2011 at 17:46 UTC
    I thank you.