use DB_File;
use Fcntl;
$H = tie(@h, "DB_File", $file, O_RDWR, 0640, $DB_RECNO)
or die "Cannot open file $文件: $!\n";
# print the records in reverse order
for ($i = $H->length - 1; $i >= 0; --$i) {
print "$i: $h[$i]\n";
}
untie @h;
欢迎光临 星星博客 (http://bbs.huhoo.net/) | Powered by Discuz! 7.0.0 |