how do I write $#queue+1 and $#{$queue[0]}+1 with array refs instead?
$#$queue+1 $#{$queue->[0]}+1
or simply
scalar @$queue # number of elements scalar @{$queue->[0]}
(you don't need the scalar if it's in scalar context anyway, like with if (@$queue) )
Presuming the first element of the referenced array holds another array ref, that is (not sure what you intend to keep there...).
In reply to Re^5: Shared variable not changing?
by almut
in thread Shared variable not changing?
by Shades
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |