#!/usr/bin/perl -w use CGI ':standard'; $a_name = defined(param('author_name')) ? param('author_name') : "Last, First*"; $form_fmt = "%s"; print < AMS_ID_FIND
Name (Last, First*):
ENDofHEADER local($rn)="\r\n"; local($TAIL) = "$rn$rn"; if ($a_name !~ /^"*([^"]+)\s*,\s*([^"]+)"*$/) { print "Check Name Format(Last, First*) : $a_name$rn"; print $TAIL; exit; } $surname=$1; $firstname=$2; $firstname =~ s/\ /*/g; # ------------------------------------- require "ams_socket.pl"; $base="/mathscinet/search/authors.html"; $out=".ams_tmp/ams_$$.html"; $file = sprintf("%s?authorName=%s%s%s",$base,$surname,"%2C+",$firstname); ($error,$errormsg,$html)=&transfer($file,"/$out"); $verbose=0; print "ERROR: $error-$errormsg-$html\n" if $verbose; if ($error==302) { ($error,$errormsg,$html)=&transfer($html,"/$out"); } # ------------------------------------- $K = "[^>]"; print "
\r\n"; open(SMPL,$out); while ($in=) { $name=$1 if $in =~ /class="profileHead">([^<]*)([^<]*)Matches:<\/strong>\s*(\d+)\s*/; } if ($in =~ /Matches:<\/strong>\s*(\d+)\s*/) { $matches = $1; print "

Total $matches Matches Found for \"$a_name\"

$rn"; } else { print "
", sprintf($form_fmt, $author, $author), ": "; print "$name : ", join('; ',@nicknames), "$rn"; } while ($in=) { next until $in=~/publications.html.*s1=(\d+).*dropdownmenu$K+>($K+)<.*\/a>/; @nicknames = (); while ( ($in=) !~ /<\/li>/ ) { if ($in =~ /
\r\n"; print ""; print $TAIL;