in reply to Help me understand this code?

Not the answer to your question (tho I will expand a bit on info sources), but the PRIMARY POINTS ILLUSTRATED BY THE CODE SHOWN ARE ... wait for them... just a little longer...

  1. Use meaningful variable names.
          $a and $b violate not only that wisdom, but should also be reserved for use in comparisons
          and...
  2. Don't get too lazy to type a few extra chars for clarity. Saving chars too enthusiastically will usually obfuscate your code rather than improve it.

As to info sources: perldoc func, op, module_name is an incantation that will lead you to explanatory docs, right on your own computer. For example, for the regexen, you might want to see perldoc perlretut (or one of its siblings); for printf (which is a function and thus needs a "-f" before its name, thusly) perldoc -f printf (which will give you a referal to another function instead of usefully answer the question "what does it do?" unless you are intimate with sprintf's format arguement ...but that's a whole different can of worms); and, as an exercise to the OP, we have the likes of qw (for which vist re "quote word" and friends); some lists (defined by the square brackets) and a few more.

...and welcome to Perl and to the Monastery!

Replies are listed 'Best First'.
Re^2: Help me understand this code?
by ansabhailte (Novice) on May 21, 2015 at 22:24 UTC
    SO I've been reading perlre and perlop and I get most of it now. But I'm still confused on the $m{$1} and $m{$_} parts. What do these do?

      %m is a hash mapping the 3 letter month to a month number.

      $m{$_} is where elements are being assigned inside a for loop.

      $m{$1} is dereferencing a particular value.

      -Greg
        I don't see a %m, I only see $m? Where is it being defined as a hash? Or is that syntax to initialize a hash: $var{$item} ? Last question too, what do the pounds in $t#$t#$t do?