in reply to Modify Email Address

Somehow (it doesn't matter how) you retrieve the e-mail address and you store it in a variable. Then it is no more difficult than to replace what is wrong by the right text:
my $email = 'me@john.com'; $email =~ s/\@john.com$/\@doe.john.com/;
Asuming of course that the "system" you are using is Perl-based.

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James