Allowing a list of ids for -id of Bio::DB::EUtilities->new()?
Peng Yu <[email protected]> Tue, 16 Jun 2015 20:36:45 -0500
| Newsgroups | gmane.comp.lang.perl.bio.general |
|---|---|
| Message-ID | <CABrM6w=LjbaO21D3FW_=2SZbihqA95cEmm=b1-PDOhEbx7VkyQ@mail.gmail.com> |
Hi,
To allow multiple ids, I have to manually concatenate ids in the form
of a string '19008417,19008416'. Would it be better to allow it take
the form of a list ('19008417', '19008416').
#!/usr/bin/env perl
use strict;
use warnings;
use Bio::DB::EUtilities;
use XML::Simple;
use Data::Dumper;
my $factory = Bio::DB::EUtilities->new(
-eutil => 'efetch',
-db => 'pubmed',
-email => '[email protected]',
-id => '19008417,19008416',
-retmode => 'xml',
);
#print $factory->get_Response->content;
my $string=$factory->get_Response->content;
print $string, "\n";
my $xml=new XML::Simple;
my $data = $xml->XMLin($string);
print Dumper($data);
--
Regards,
Peng