A group which has ? after it to make it optional will 'use up' a grouping variable whether or not it gets matched. So
/(a)?(b)/
will place "b" in $2 whether matched against "ab" or "b".
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 )