foreach my $element (@fields) { $element =~ s/\s+//g; $element .= $element; } [download]
In reply to array with s///g command by convenientstore