From 0260e5793d19fff40feba13d42dfe1315cdaa88f Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Tue, 14 Jan 2014 12:42:32 -0800 Subject: [PATCH] fix how ids is handled; the documentation is completely wrong --- pubmed_search | 3 +++ 1 file changed, 3 insertions(+) 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 " + "; -- 2.39.2