Try:
binmode(HANDLE)
before reading the file.
HANDLE is your filehandle.
If that doesn't work you might want to supply the
text file and a sample script.
Mike
On 4/12/2018 12:04 PM, beginners-digest-h...@perl.org wrote:
I have a text file (created by pdftotext) that I've imported into my
On Thu, 2018-04-12 at 17:26 +0100, Gary Stainburn wrote:
> I have a text file (created by pdftotext) that I've imported into my
> script.
>
> It contains ASCII characters 251 for crosses and 252 for ticks.
ASCII defines 128 characters so those characters are not ASCII.
John
--
To unsubscribe
On Thursday 12 April 2018 19:53:16 Shlomi Fish wrote:
> Perhaps see http://perldoc.perl.org/perlunitut.html - you may need to read
> the file as binary or iso8859-1 or whatever. Also see
Thanks for this Shlomi. I have looked into that before briefly when doing http
gets and reading office documen
On Thu, 12 Apr 2018 17:26:57 +0100
Gary Stainburn wrote:
> I have a text file (created by pdftotext) that I've imported into my script.
>
> It contains ASCII characters 251 for crosses and 252 for ticks. If I load
> the file in gvim and do :as
>
> it reports the characters as
>
> 251, Hex
> However, when I try to seacch for it using
if ($line=~/[\xfb|\xfc]/) {
Note, you're mixing the character class " [ab] " with grouping alternative
pipe " ( a | b ) " here
> or even just
if ($line=~/\xfb/) {
Dunno, works here:
$ perl -e '$line = "hi" . chr 251 . "ho" . chr 252 ; if
($line=~/
I have a text file (created by pdftotext) that I've imported into my script.
It contains ASCII characters 251 for crosses and 252 for ticks. If I load the
file in gvim and do :as
it reports the characters as
251, Hex 00fb, Octal 373
252, hex 00fc, Octal 374
However, when I try to seacch f