|We don't bite newbies here... much
pack peculiarityby bl0rf (Pilgrim)
|on Dec 26, 2003 at 21:06 UTC
bl0rf has asked for the wisdom of the Perl Monks concerning the following question:
After reading the pack/unpack tutorial by pfaut I felt brave and decided to do some things with the scariest function in Perl. I saw something very weird that I hope you might explain to me.
The number above is the result of a concatenation of the letters ABCD ( I'll put the whole thing in the code snippets section later ). What I don't understand is why Perl convert the number into four characters instead of into a "long" number
I'm completely puzzled, and Perl even converts the number into the correct letters ( okay, I converted them to binary, concatenated and converted to a long again before doing the above ). Could somebody explain this madness to me, as my work with pack/unpack is purely hit-and-miss :-(
Thanks for your help.