It's quite possible that I'm being exceedingly dense, but how is this any different from just:
perl -E"say reverse<>" /etc/passwd

UPDATE- we only wanted it to work as described below-- with implicit reassignment of $_ to $a and also to $b.

It's not the same. BrowserUK's solution uses two regexes, each with a capture group. The capture groups implicitly assign to what would be the equivalents of "$a" and "$b". Since the point of this excercise was to save typing (potentially at the loss of clarity), BrowserUK didn't bother wasting precious keystrokes in explicitly assigning the result of the regex capture groups to an "$a" or "$b". Instead, he/she (I don't know BrowserUK personally) just let Perl handle those details. BrowserUK definitely meant what was posted ;~)

Tommy
A mistake can be valuable or costly, depending on how faithfully you pursue correction

Technically it's *possible* that usernames can be completely numeric, but that's outright abusive--borderline illegal, and definitely prone to all kinds of problems.

If I we were dealing with "abusive" uid's, it wouldn't be too hard to add a neg look-behind assertion.

Now, for the meat and potatoes... I did run into some small typos in your code, but after correcting them, it worked. *slow and dramatic golf clap*. I had a hunch it could be done with regexes!! I've said it before, and I'll say it again... you have a dark gift my friend (sarcasm).