Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Don't Use Regular Expressions To Parse IP Addresses!

by Anonymous Monk
on Sep 04, 2004 at 01:48 UTC ( [id://388465]=note: print w/replies, xml ) Need Help??


in reply to Don't Use Regular Expressions To Parse IP Addresses!

I prefer to use inet_ntop/inet_pton instead of inet_ntoa/inet_aton. These functions also accept IPv6 addresses, making porting to IPv6 much easier. In fact, with the right functions its not too difficult to write family-independent (IPv4 or IPv6) programs. IPv6 users will thank you.
  • Comment on Re: Don't Use Regular Expressions To Parse IP Addresses!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (5)
As of 2024-06-15 20:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.