#!/usr/bin/perl use strict; use lib '/home/dcat/perlmods/share/perl/5.8.4/'; use Net::CIDR; use Net::CIDR ':all'; use CGI::Minimal; my $cgi = CGI::Minimal->new; sub print_nets { my($r1, $r2) = @_; $r1 = $cgi->htmlize($r1); $r2 = $cgi->htmlize($r2); print '
$r1 - $r2
\n"; print "Result:
\n";
print join("
\n", Net::CIDR::range2cidr("$r1-$r2"));
print "
Submit the start and end range
This is a simple web interface for Net::CIDR's range2cidr function.
Source code for this page: range2cidr.pl.