in reply to perl 5.10 bug or not?
You aren't testing to see if the match succeeded.
The values of $1 and $2 are meaningless unless the match succeeded.