From: Don Armstrong Date: Tue, 14 Jan 2014 20:42:32 +0000 (-0800) Subject: fix how ids is handled; the documentation is completely wrong X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=0260e5793d19fff40feba13d42dfe1315cdaa88f;p=bin.git fix how ids is handled; the documentation is completely wrong --- diff --git a/pubmed_search b/pubmed_search index cc90661..6dff865 100755 --- a/pubmed_search +++ b/pubmed_search @@ -92,6 +92,9 @@ my $result = $fac->esearch(-email => 'don@donarmstrong.com', -retmax => 1000, )->run(); my @ids = $result->ids; +if (@ids > 0 and ref($ids[0])) { + @ids = @{$ids[0]}; +} if ($options{org_mode}) { print "* Pubmed search results for ".join(' ',@ARGV)." (".scalar(@ids).")\n"; print " + ";