You could explicitly use the concatenation operator . and do $distlist .= " $k\@myorg.mydomain".
You could build an array and join the items after the fact.
my @addrs; for my $x ( @emaillist ) { push @addrs, "$k\@myorg.mydomain"; } my $distlist = join( " ", @addrs );
You could use map and join and do it all in one swell foop.
my $distlist = join( " ", map { "$_\@myorg.mydomain" } split( /,/, $AR +GV[1] ) );
Depends on one's definition of better.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Turning a comma-delimited list of internal email addresses into a space-delimited list of internet email addys?
by OfficeLinebacker (Chaplain) on Apr 28, 2006 at 20:22 UTC |