in reply to Extract and read different columns from the file

Your task specification is incomplete. We don't know which columns are the required ones, and we have no idea what kind of data structure you have in mind.

But I'll make a wild guess that the fifth element ('187960098') is going to be the index or key into the hash, and that you want to store the sixth element ('NP_001120800.1') as the value. In that case, the code would be

#!/usr/bin/perl # # use common::sense; use Data::Dumper; { my %h; while(<DATA>) { my @f = split; $h{$f[4]} = $f[5]; } print Dumper ( \%h ); } __DATA__ 3 9606 34 ACADM 187960098 NP_001120800.1
When run, this produces
$ perl -w 867594.pl $VAR1 = { '187960098' => 'NP_001120800.1' }; $
QED.

Alex / talexb / Toronto

"Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds