Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Answer: Converting an IP from hexadecimal to dotted-quad

( #193759=categorized answer: print w/ replies, xml ) Need Help??

Q&A > data formatting > Converting an IP from hexadecimal to dotted-quad 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;

Comment on Answer: Converting an IP from hexadecimal to dotted-quad
Download Code
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2014-07-23 04:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (133 votes), past polls