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 )

Friday, June 22, 2012

Last index of array

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.

Followers

Blog Archive