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.
In reply to Re: Turning a comma-delimited list of internal email addresses into a space-delimited list of internet email addys?
by Fletch
in thread Turning a comma-delimited list of internal email addresses into a space-delimited list of internet email addys?
by OfficeLinebacker
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |