HEX
Server: Apache
System: Linux pdx1-shared-a1-38 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64
User: mmickelson (3396398)
PHP: 8.1.31
Disabled: NONE
Upload Files
File: //usr/share/doc/libwww-search-perl/examples/motif_references.pl
#!/usr/bin/perl

use strict;
use warnings;

use lib qw(../lib);
use WWW::Search;

my $motif	= shift || 'ACCTA';
my $s		= new WWW::Search ('PubMed');
$s->native_query( $motif );


my $count	= 0;
while (my $r = $s->next_result) {
	unless ($count++) {
		print "The following abstracts mention the motif '${motif}':\n\n";
	}
	
	print join(' ', "${count}.", $r->title, $r->description) . "\n\n";
}

unless ($count) {
	print "No abstracts were found that mention the motif '${motif}'.\n";
}