in reply to Re^2: How to find Unicode: 0x13 in File
in thread How to find Unicode: 0x13 in File
Why do you specify the length in hex?
Also note that if you use a length greater than 1 (which you want to speed it up), you can find false positives: read $fh, my $char, 2 reports 0x13 present in the following file:
a1
because
$ perl -wE 'say unpack "H*", "a1"' 6131 ~~
($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: How to find Unicode: 0x13 in File
by james28909 (Deacon) on Nov 18, 2016 at 17:24 UTC | |
by AnomalousMonk (Archbishop) on Nov 18, 2016 at 19:57 UTC | |
by james28909 (Deacon) on Nov 19, 2016 at 15:55 UTC | |
by AnomalousMonk (Archbishop) on Nov 19, 2016 at 17:27 UTC |