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 )

Monday, April 15, 2013

Perl regular expression /m and /s modifiers

All /m does is to make ^ and $ match start and end of line anywhere in the string (rather than match beginning and end of whole string).

You don't have to use /m just because your string contains multiple lines, unless your match has a ^ or $ in it and you expect the match to be looked for on each line.

/s makes . match a newline, which otherwise it won't.

Followers

Blog Archive