#!/usr/local/bin/perl -w =head1 NAME dumpRS.pl - скрипт для создания дампа таблицы word2question. =head1 SYNOPSIS dumpRS.pl output =head1 DESCRIPTION Создаёт дамп таблицы word2question. Формат записи: идентификатор слова (2 байта), длина поля questions (4 байта), содержимое поля questions. =head1 AUTHOR Роман Семизаров =cut use dbchgk; my $output=shift; if (!$output) { print "Usage: dumpRS.pl output\n"; exit } open OUT, ">$output" or die "Can not open $output"; binmode(OUT); open STDERR, ">errors"; getword2question; while (($word,$quest)=getrow,$word) { print "$sch...\n" unless (++$sch%100); print OUT pack("L",$word); print OUT pack("L", length $quest); print OUT $quest; }