Not quite sure what the question is but using strict and
warnings is a good start. The following code now at least
runs.
You seem to be mixing the object/non-object method of calling the CGI functions
#!/usr/bin/perl -w use strict; use CGI; use CGI::Carp qw(fatalsToBrowser); #$|++; # $CGI::POST_MAX=100; # $CGI::DISABLE_UPLOAD=1; my $q=new CGI; print $q->header(); print $q->start_html(-title=>'check',-bgcolor=>"#000099",-text=>"#FF99 +33", -link=>"#FF3300",-alink=>"#FF3300",-vlink=>"#FF3300"); my %labels=('200.160.128.41'=>'HOST01', '200.160.128.42'=>'HOST02', '200.160.128.52'=>'HOST03', '200.160.136.130'=>'HOST04', '200.160.136.131'=>'HOST05', '200.160.136.132'=>'HOST06', '200.160.136.133'=>'HOST07', '200.160.136.136'=>'HOST08', '200.160.136.139'=>'HOST09', '200.160.136.140'=>'HOST10', '200.160.128.31'=>'HOST11', '200.160.128.88'=>'HOST12', '200.160.136.135'=>'HOST-GEST', '200.160.128.62'=>'HOSTSsql04', '200.160.128.43'=>'HOSTsql03', ) ; print $q->start_form(-method=>'POST',-name=>'form1'); print $q->checkbox_group(-name=>'quale_server', -values=>['200.160.128.41', '200.160.128.42', '200.160.128.52', '200.160.136.130', '200.160.136.131', '200.160.136.132', '200.160.136.133', '200.160.136.136', '200.160.136.139', '200.160.136.140', '200.160.128.31', '200.160.128.88', '200.160.136.135', '200.160.128.62', '200.160.128.43'], #-default=>[keys %labels], -linebreak=>'true', #-size=>15, -multiple=>'true', -labels=>\%labels, #-columns=>2 ); print $q->submit(-value=>'search'),$q->end_form(); print $q->br; if (defined $q->param()){print "The keywords are: ",$q->em(join(", ", +$q->param('quale_server')))} ##or @server=param('quale_server'); ########################################################## print $q->end_html();

In reply to Re: checkbox_group CGI.pm madness by ColtsFoot
in thread checkbox_group CGI.pm madness by Discipulus

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.