看板 [ Perl ]
討論串[問題] binary file 處理問題
共 3 篇文章
首頁
上一頁
1
下一頁
尾頁

推噓0(0推 0噓 1→)留言1則,0人參與, 最新作者roy8130 (reputation)時間18年前 (2007/09/05 08:13), 編輯資訊
0
0
0
內容預覽:
use strict;. my $buffer = "";. open(FILE, "<Data.dat");. binmode(FILE);. read(FILE, $buffer, 10000000, 0);. close(FILE);. foreach (split(//, $buffer))
(還有111個字)

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者LiloHuang (相見不如懷念)時間18年前 (2007/09/05 00:29), 編輯資訊
0
0
0
內容預覽:
#!/usr/bin/perl. open(FILE, "user.dat");. binmode(FILE);. while(read(FILE, $buffer, 4)) {. print sprintf("%2s "x4, unpack("H2"x4, $buffer)),$/;. }. cl

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者roy8130 (reputation)時間18年前 (2007/09/04 23:49), 編輯資訊
0
0
0
內容預覽:
我的binary file為4 bytes, binary.dat格式如下. 00000000h: 18 00 00 00 01 00 00 00 02 00 00 00 03 00 00 00 ; ................. code如下. use strict;. my $buffer
(還有237個字)
首頁
上一頁
1
下一頁
尾頁