--- db/prgsrc/updatedb.pl 2000/10/22 05:10:12 1.14 +++ db/prgsrc/updatedb.pl 2000/10/22 06:03:35 1.15 @@ -22,7 +22,7 @@ The database, user and password are hard Dmitry Rubinstein -=head1 $Id: updatedb.pl,v 1.14 2000/10/22 05:10:12 boris Exp $ +=head1 $Id: updatedb.pl,v 1.15 2000/10/22 06:03:35 boris Exp $ =cut @@ -78,9 +78,8 @@ sub getField { } next if (/^\s*$/); - if (s/^(.*?)[:\.]\s*// && !$key) { + if (/^(.*)[:\.]\s*/ && !$key) { $key = $1; - $value=$_; next; } if ($key) { @@ -227,7 +226,7 @@ MAIN: # Inherited fields for a Question # my %QuestionFields = ('Тип'=> 'Type', 'Вид'=> 'Type', - 'Автор' => 'Authors', + 'Автор' => 'Authors', 'Рейтинг'=>'Rating', 'Источник' => 'Sources'); @@ -318,7 +317,7 @@ MAIN: next; } - my @Fields = grep /$key/, keys %QuestionFields; + my @Fields = grep { $key =~ /$_/ } keys %QuestionFields; if (scalar @Fields) { my $word = shift @Fields; @@ -333,7 +332,7 @@ MAIN: next; } - @Fields = grep /$key/, keys %TourFields; + @Fields = grep { $key =~ /$_/ } keys %TourFields; if (scalar @Fields) { my $word = shift @Fields;