Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: decimal -> hex

by blakem (Monsignor)
on Oct 11, 2002 at 07:37 UTC ( [id://204437]=note: print w/replies, xml ) Need Help??


in reply to decimal -> hex

dec -> hex:
my $ip = '127.0.0.1'; $ip =~ s/(\d+)/sprintf "%02X",$1/ge;
hex -> dec:
my $ip = '7F.00.00.01'; $ip =~ s/([abcdef\d]+)/hex $1/gie;

-Blake

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (5)
As of 2024-04-26 07:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found