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 )

Tuesday, August 31, 2010

Array slices

NB the syntax for slices is

@a[1,2]

If you use $a[1,2] you'll just get $a[1] (-w gives a 'Multidimensional syntax not supported' warning).

Further note that @a[m,n] just returns elements m and n, not all elements from m to n. Use m..n for the latter (note that, as with all Perl ranges, both ends of the range must be specified).

Followers

Blog Archive