noh*_*hat 4 perl file
将磁盘上文件的指定字节范围提取到变量中最方便的方法是什么?
mob*_*mob 5
seek到范围的开头,read所需的字节数(或sysseek/ sysread- 参见nohat的评论).
seek
read
sysseek
sysread
open $fh, '<', $filename; seek $fh, $startByte, 0; $numRead = read $fh, $buffer, $endByte - $startByte; # + 1 &do_something_with($buffer);
归档时间:
15 年,6 月 前
查看次数:
609 次
最近记录: