Subject: | Empty result of search caused abnormal termination of script |
If result of search is empty, message
"Can't call method "look_down" on an undefined value at
/usr/lib/perl5/site_perl/5.8.6/WWW/Search/MSN.pm line 110" appeared and
script terminated.
Sample code:
#!/usr/bin/perl
use strict;
use WWW::Search::MSN;
my $query = 'mumzik8797';
my $search = WWW::Search->new("MSN");
$search -> native_query(WWW::Search::escape_query($query));
$search -> maximum_to_return(100);
while ( my $result = $search -> next_result() ){
my $url = $result -> url;
print $url."\n";
}