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 7, 2013

pos

Perl pos does, helpfully, return an index 1 greater than the index of the last character in the string if the last match 'left off matching' after the end of the string.

Just to be clear, suppose you have an 11-character string whose last index is, Perl being 0-based, 10. If the last character of the last match in the string is the last character in the string, pos will return 11 after the last match.

Followers

Blog Archive