http://qs321.pair.com?node_id=1171142


in reply to Re^3: Got some problem with read write file
in thread Got some problem with read write file

#!usr\bin\perl -w #!/usr/bin/perl use warnings; use strict; open my $HUBFILE, '<', '1048_undefined.tsv' or die $!; my @hubs; while (my $line = <$HUBFILE>) { push @hubs, $1 if $line =~ /\d+ \t (\w+) \t/x; } close $HUBFILE; open my $OUT, '>', 'hubs.txt' or die $!; for my $hub (@hubs) { print {$OUT} "$hub\n"; } close $OUT;