Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^2: binary parsing

by biohisham (Priest)
on Jan 30, 2011 at 03:43 UTC ( [id://885094]=note: print w/replies, xml ) Need Help??


in reply to Re: binary parsing
in thread binary parsing

It seems that the output is different on an Win32 XP system...
perl -le"print length unpack "A", "\n";" 1
Could you please direct me in which side of the documentation neighborhood that this is reported ?


Excellence is an Endeavor of Persistence. A Year-Old Monk :D .

Replies are listed 'Best First'.
Re^3: binary parsing
by ikegami (Patriarch) on Jan 30, 2011 at 04:44 UTC

    Your quoting is broken. You are doing

    >perl -le"print length unpack 'A', \'n';" 1

    which is the same as

    >perl -le"print length unpack 'A', 'S';" 1

    If you fix the quoting, you get the correct result.

    >perl -le"print length unpack 'A', qq{\n};" 0

    pack says "When unpacking, «A» strips trailing whitespace and nulls".

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://885094]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (7)
As of 2024-04-23 09:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found