in reply to Re: Is the documentation for Perl 5.20 'pack' correct?
in thread Is the documentation for Perl 5.20 'pack' correct?

Hello Corion,

Displaying the disk file in hex, the packed number 16909060 is:

my $packed_number = pack( "N", 16909060 );
displayed as hex '01020304' :-)

Further, you can just do the following:

my $packed_number = pack( "N", 16909060 ); print unpack("H8",$packed_number),"\n";
which yields hex '01020304'.

Regards...Ed

"Well done is better than well said." - Benjamin Franklin