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

Re2: decimal -> hex

by blakem (Monsignor)
on Oct 11, 2002 at 10:29 UTC ( #204460=note: print w/replies, xml ) Need Help??


in reply to Re: decimal -> hex
in thread decimal -> hex

I think you've got your nybble order mixed up...
print join(".",unpack("H2H2H2H2",pack("c4",split /\./,$ip)));

-Blake

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (2)
As of 2019-08-23 23:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?