⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 12_longfetch_rs.t

📁 source of perl for linux application,
💻 T
字号:
#!/usr/bin/perl## Make sure we can fetch a record in the middle of the file# before we've ever looked at any records before it## (tests _fill_offsets_to() )#my $file = "tf$$.txt";my $data = "rec0blahrec1blahrec2blah";print "1..5\n";my $N = 1;use Tie::File;print "ok $N\n"; $N++;open F, "> $file" or die $!;binmode F;print F $data;close F;my $o = tie @a, 'Tie::File', $file, autochomp => 0, recsep => 'blah';print $o ? "ok $N\n" : "not ok $N\n";$N++;my $n;# 3-5for (2, 1, 0) {  print $a[$_] eq "rec${_}blah" ? "ok $N\n" : "not ok $N # rec=$a[$_] ?\n";  $N++;}END {  undef $o;  untie @a;  1 while unlink $file;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -