theantler has asked for the wisdom of the Perl Monks concerning the following question:
We pack from 8-bit numbers to ascii character representation, and unpack from ascii character to 8-bit number, why is it called char and not ascii? Can someone see how I am confused, and what to do to understand it better? Thanks TA$pack = pack ('c4', 65, 66, 67, 68); print "$pack\n"; @h = unpack ('c4', $pack); print "@h\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Datatype and pack/unpack
by Corion (Patriarch) on Mar 19, 2010 at 14:43 UTC | |
|
Re: Datatype and pack/unpack
by roboticus (Chancellor) on Mar 19, 2010 at 14:56 UTC | |
by theantler (Beadle) on Mar 19, 2010 at 18:24 UTC | |
by Anonymous Monk on Mar 19, 2010 at 20:04 UTC | |
by theantler (Beadle) on Mar 19, 2010 at 20:24 UTC | |
|
Re: Datatype and pack/unpack
by ikegami (Patriarch) on Mar 19, 2010 at 15:07 UTC | |
|
Re: Datatype and pack/unpack
by eff_i_g (Curate) on Mar 19, 2010 at 17:28 UTC |