Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: question about pack

by TomDLux (Vicar)
on Oct 15, 2013 at 00:14 UTC ( [id://1058220] : note . print w/replies, xml ) Need Help??


in reply to question about pack

Why don't you try it and tell us? Something like ...

for my $data ( 250 .. 260 ) { my $packed = pack 'c', $data; printf "%X => %X\n", $data, $packed; }

As Occam said: Entia non sunt multiplicanda praeter necessitatem.

Replies are listed 'Best First'.
Re^2: question about pack
by AnomalousMonk (Archbishop) on Oct 15, 2013 at 03:02 UTC

    ... or perhaps better as:

    >perl -wMstrict -le "my $cp = pack 'c*', 256 .. 260, 320 .. 324; print qq{'$cp'}; "
Re^2: question about pack
by lightoverhead (Pilgrim) on Oct 16, 2013 at 01:24 UTC

    They are all "0"