Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: decimal -> hex

by blakem (Monsignor)
on Oct 11, 2002 at 07:37 UTC ( #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
Node Status?
node history
Node Type: note [id://204437]
help
Chatterbox?
and the web crawler heard nothing...

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

    No recent polls found

    Notices?