|
ずっと前に、 while (<>) { ... } のファイルハンドル ARGV に binmode が適用されないので、 while (<>) { ... } における ActivePerl の \r\n => \n 置換を抑制できない、 という話をしましたが、5.6 以降では binmode のかわりに use open IN=>"raw:"; だと動作するようです。PerlIOってやつですね。 |
|
>>3193 ふくし 自己レスれす。 use open IN=>":raw"; の間違いでした。 |
|
>>3185 ふくし perldoc perlre > You cannot include a literal "$" or "@" within a "\Q" sequence. An > unescaped "$" or "@" interpolates the corresponding variable, while > escaping will cause the literal string "\$" to be matched. You'll need > to write something like "m/\Quser\E\@\Qhost/". >>3192 68user > その辺の評価順序 「詳説 正規表現」のP245とか… |
|
改行コードについて質問いたします。 UNIX(HP-UX)の改行コードはLFだと思うのですが、 このコードを削除して複数行のテキストファイルを 一行にすることは可能でしょうか? |