in reply to Re: running same bit of code twice
in thread running same bit of code twice

Hi
Thanks for the info. As the bit before the @domainX.com is not going to be static, how would i change it to $username@domain1.com $username@domain2.com? I have tried  my @reg_addrs = qw($username@domain1.com $username@domain2.com); but this simply writes $username@domainX.com to the file and not the contents of $username.

Replies are listed 'Best First'.
Re: Re: Re: running same bit of code twice
by The Mad Hatter (Priest) on May 04, 2003 at 18:09 UTC
    That's because qw doesn't interpolate variables. So change that line to
    my @reg_addrs = ("$username\@domain1.com", "$username\@domain2.com");
    and you're set.
      cheers guys, your both diamonds