my @london = grep { (split /\t/)[$n] =~ /LONDON/ } grep { /LONDON/ } @records;