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

Answer: Converting an IP from hexadecimal to dotted-quad

by Abigail-II (Bishop)
on Aug 29, 2002 at 13:28 UTC ( #193759=categorized answer: print w/replies, xml ) Need Help??

Q&A > data formatting > Converting an IP from hexadecimal to dotted-quad - Answer contributed by Abigail-II

Here's one way, using Regexp::Common, although it's unlikely to be the most efficient:
use Regexp::Common; $ip =~ s( ^$RE{net}{IPv4}{hex}{-sep=>''}{-keep}$ ){ join '.', map { hex } $2, $3, $4, $5 }xe;

Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2016-12-05 09:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (75 votes). Check out past polls.