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; }
In reply to Re: LWP::Simple problems
by chromatic
in thread LWP::Simple problems
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |