foreach my $Name2 (@lines) { my @field = split(':',$Name2); if ($field[1] =~ /(?