in reply to perl script
I used a similar idea but did as follows:
my $file = '...the OPs File example..." #used as a string
# to simplify my
my @gi_ids = $file =~/gi\|(\d+)\|/g;
That leaves the list @gi_ids containing all of the gi id's that were in the string (i.e., it finds 4 gi id's in the OPs example).
Just another possible strategy. It looks to me like all of the respondents' ideas would work fine. Mine is just another variation.
Hope that helps.
Once (shame on you!)
Twice (shame on me!)
More often than I'd like to be
All the time
Just when answering stupid polls
Who you callin' a fool?
I refuse to vote in this ridiculous poll
Results (449 votes). Check out past polls.