#!usr\bin\perl -w open HUBFILE,"1048_undefined.tsv"; @hub=(); while(my $line = ){ if($line=~m/\d \t (\w+) \t \.+/g){ push(@hub,$1); } }close HUBFILE; open OUT,">hubs.txt"; print OUT "HUB:$hub[0]\n"; close OUT;