foreach my $item (@list) { my @tokens = split ' ', $item; ...