[Ottawa-pm] Fwd: CIDR to IP-netmask
Yanick Champoux
champoux at pythian.com
Tue Apr 5 08:12:32 PDT 2011
On 04/04/11 22:29, Mark Mielke wrote:
> My personal take is that it is wrong to not use a module to do this
I pretty much had the same reaction. For real projects, I would use
something like Net::CIDR, and be done with it. It's the kind of problem
that falls in the same category than XML, CSV and email addresses. On
the outside, it looks simple enough. Once you begin to poke around, you
realize the exceptions, subtleties and quirks are much more trouble than
first expected. If some other poor sod^D^D^D brave soul took years to
finely hone a solution for the problem, I don't see the point of trying
to churn my own.
Mind you, playing with IP addresses by hand is a good exercise, but
that's a bit of fun that I don't have time for right now. :-)
Joy,
`/anick
More information about the Ottawa-pm
mailing list