看板 Perl 關於我們 聯絡資訊
※ 引述《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