in reply to Regex being stupid

Assuming (just my guess) that what you wanted to do with the final (\w+) was to capture the end of the address, you could use this:

$text =~ s/(\w+)\@(\w+)\.([\w.]+)/$1@$2.$3/;