>>746
すみません、こんな感じです。

$euc_regex = "(?:$ascii|$two_bytes|$three_bytes)*?";
#検索
while (chomp ($_ = <IN>)) {
 if (/<DOCID>(.+)<\/DOCID>/) {
  $docid = $1;
 }
 if (/<TITL>(.+)<\/TITL>/) {
  $title = $1;
 }
 if (/<AUTHOR>(.+)<\/AUTHOR>/) {
  $author = $1;
 }

 if ($form{'tosho1'} eq "all") {
  if (/^$euc_regex($key1)/) {
   $found++;
   print "ID=$docid TITLE=$title AUTHOR=$author<BR>\n";
   print "$& <BR>\n<BR>\n";
  }
 }
}