in reply to Re^2: Matching a hex value in a string...
in thread Matching a hex value in a string...
No. \n is \x0A on Windows. (And $/ is \n, since the CRLF→LF conversion occurs before the buffer is searched for the IRS.)
>perl -e"print length qq{\n} 1 >perl -e"print qq{\n} eq qq{\x0A} ?1:0 1 >perl -e"print $/ eq qq{\x0A} ?1:0 1 >echo foo| perl -e"print length <> 4
Maybe you're thinking of older Macs, where \n is \x0D.
Update: Added proof.
|
|---|