Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Converting integer to bytes

by shmem (Chancellor)
on Jan 07, 2021 at 11:35 UTC ( #11126523=note: print w/replies, xml ) Need Help??


in reply to Converting integer to bytes

If you are sure the user ID is an integer:

my $user_id_h = unpack("H*", pack("Q>",$user_id)); print(dump($user_id_h));
perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11126523]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2021-03-01 04:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?