in reply to searching and printing what is wanted

You seem to be on the right track. Here's an idea:

while ( <DATA> ) { @tokens = split(/\t+/, $_ ); foreach $tok (@tokens) { delete $hash{$tok}; } } foreach $tok ( keys( %hash ) ) { print "$tok\n"; }