-my $fac = Bio::DB::SoapEUtilities->new();
-
-my $result = $fac->esearch(-email => 'don@donarmstrong.com',
- -db => 'pubmed',
- -term => join(' ',@ARGV),
- -retmax => 1000,
- )->run();
-my @ids = $result->ids;
+my $result =
+ Bio::DB::EUtilities->new(-email => 'don@donarmstrong.com',
+ -db => 'pubmed',
+ -term => join(' ',@ARGV),
+ -retmax => 1000,
+ -eutil => 'esearch',
+ );
+my @ids;
+eval {
+ # this warns for everything, so hide the warning.
+ local $SIG{__WARN__} = sub {};
+ @ids = $result->get_ids('pubmed')
+};
+if (not @ids) {
+ print "No results\n";
+ exit;
+}