Looking at the CPAN Testers Matrix and some specific test results for Net-Netmask is worrying to me: the operations the module is performing should be deterministic, but at least on Linux some tests are failing sometimes*, so I'm not really sure if this module is reliable. I'm not up-to-date on the best modules for this kind of task, so perhaps another monk will be able to recommend something.
* Update: I would guess it has to do with the options Perl was built with, a quick sampling of some failing vs. passing configurations shows that the failing ones have, among other things, USE_LONG_DOUBLE set, as also reported in #99184. OTOH, even older versions, like the one you've linked to, show some test failures.