It is not shorter, but I think it is clearer because I am only doing one thing at a time. In your foreach loop you are basically do a fancy concat with spaces and adding the '@myorg.domain' all the same line. It is kinda hard to see that just by looking at it.my @addresses = split q{,}, $ARGV[1]; foreach my $address (@addresses) { $address .= q{@myorg.mydomain}; } my $list = join q{ }, @addresses;
|
|---|