$1 captures 12, you are right. However, you do an array slice thing with the  part -- which on my machine perl 5.6.1 AS build 633 produces an error; I have to move the parentheses around the regex itself. And when you print it, it shows a 1 on my computer. I just don't see the need for the 
What error does it produce on your machine?
On mine, the array slice is necessary to put the regex in list context
so that it returns the captured string instead of the true or false value it returns in scalar context