... what's with the local *nums; though?
I used package variables because regexps capture. Putting the regexp in a sub would only work once if I had used lexical variables instead of pacakge variables.
our @nums; makes it so I can say @nums instead of @main::nums to refer to the package variable.
local *nums works better than local @nums;. They both ensure that @main::nums has the same value when we're done as it did when we started. In other words, it makes sure we're not trampling over someone else's variables.