Calculate IP network parameters (Perl CLI and CGI)