#!/usr/bin/perl
use strict;
use warnings;
#file snCalc.cgi little subnet calculator app
my %webvar = parse_post();
my $input;
print "Content-Type: text/html\n\n";
open(HTML, "../startsn.html")|| die "Could not open starsn.html :$!";
my $start = join('', );
close(HTML);
print $start;
if($webvar{input} =~ m/(\d\d)/)
{
$input = 1*$1;
}
else
{
$input = 29;
}
if ($input > 32 || $input < 24)
{
printAndExit("Don't know what to do with '$input' as a masklength.");
}
else
{
my $ltinput = $input -1;
my $gtinput = $input +1;
print qq(