Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Re^2: binary parsing

by biohisham (Priest)
on Jan 30, 2011 at 03:43 UTC ( #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 (Pope) 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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://885094]
[Corion]: Hmm - HTC Vive reduces its price to EUR 700 (from EUR 900). Now I have to look what graphics cards prices are - maybe a good enough VR rig can be had for EUR 1500 now instead of EUR 2000(+)
[Corion]: Hmm - nVidia GTX 1070 + Vive makes EUR 1130, leaving EUR 370 for CPU+case+cooler+ RAM - not bad
[Corion]: (I'm not a fan of AMD)

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2017-08-21 08:33 GMT
Find Nodes?
    Voting Booth?
    Who is your favorite scientist and why?

    Results (319 votes). Check out past polls.