while () { if (m/zaps/i) { my $zapschool = (split(/\t/))[4]; print NEWFILE "$zapschool\n"; } }