The equivalent to
$#array (which finds the last index of @array)
for an array reference $rArray is
$#{$rArray}
(note the second dollar sign)
And note that it is not
$#{ @{$rArray} }
where you're putting an array into a context where a reference to an array is expected. Beware, this fails without giving a warning.
Anti-nuisance lawsuit warning: The purpose of these notes is to remind me, Zoegond, of stuff or to help me work stuff out. They may contain mistakes.
Quick
- ($a, $b....) = unpack("A2A7...", $packed)
- push( array, list )