in reply to Converting integer to bytes
You can use unpack to get the hex representation back to verify it's correct:my $eight_bytes = pack 'Q>', $user_id;
my $hex = unpack 'H16', $eight_bytes;
Update: renamed $int to $eight_bytes as the value is not an integer in Perl's sense.
|
|---|