#!/usr/bin/perl use CGI qw/:standard/; $query= new CGI; if ($query->param()) { open (CFGFILE,">>mothership.cfg") || die; print CFGFILE (param('name')),",", ($query->param('ip')),",", ($query->param('port')),",", ($query->param('proto')),",", ($query->param('desc')), "\n"; close CFGFILE; $query->delete_all(); } print header, start_html('Mothership Connection'), h1('Mothership Connection Configuration'), $query->start_form, "Server Name ",$query->textfield('name'),p, "IP Address ",$query->textfield('ip'),p, "Port Number",$query->textfield('port'),p, $query->checkbox_group(-name=>'proto', -values=>['tcp','udp']),p, "Description",$query->textfield('desc'),p, $query->submit('submit'), $query->end_form, hr;