作者sixth (海很蓝,星光灿烂)
看板Perl
标题Re: [问题] hex2asc
时间Sat Nov 5 14:34:05 2011
※ 引述《sixth (海很蓝,星光灿烂)》之铭言:
: $hex = "0a";
: $asc = pack('H2', $hex );
: 印出来是 0D 0A
: 请问怎样可以只印出 0A
: 谢谢
自问自答
搜寻了 1307 1 4/16 billmax □ [问题]在win底下列印unix的换行符号
我把输出 加 binmode 就可以了
如:
open (FILE_BITSTREAM , "> $out_file") || die "can not open $out_file : $!\n";
binmode FILE_BITSTREAM;
print FILE_BITSTREAM "$asc";
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 123.110.185.201