in reply to LWP::Simple problems
I think this code is shorter but still does what you want.
use strict; my @fasta; for my $acc (@accession) { next unless /_(\d+);/ my id = $1; my $seq = get( "http://us.expasy.org/cgi-bin/get-sprot-fasta?$id"; unless (defined $seq) { print "Couldn't find id $id\n"; next; } push @fasta, $seq; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: LWP::Simple problems
by davido (Cardinal) on Jan 29, 2005 at 16:34 UTC | |
by monkey_boy (Priest) on Jan 30, 2005 at 20:23 UTC |