Dear monks,

I have a log file were one of my scripts stores data about webservers. There are 16 entries. Now I wont create a CGI (I run win IIS unfortunatly..) to search these entries belonging two index of the entries: until now all is OK:
#$cosa is the first parameter of the request while (<LOGFILE>) { push(@logline, $_); } ... foreach $record(@logline) { my @ciccio=split/\?/,$record; pop @ciccio; if ($ciccio[2]=~/$cosa/ || $ciccio[3]=~/$cosa/ || $ciccio[14]=~/$co +sa/ ) { $indice++; print table({-border=>0,-width=>"100%", -cellspacing=>"0", -cellpa +dding=>"0"}, Tr({-align=>LEFT,-valign=>TOP}, [ td([$q->h5("$indice)"),"$ciccio[0]","poiiiii $risultato_pin +g"]), td([$q->a({-href=>"http://$ciccio[2]",target=>new},"$ciccio +[2]"),"$ciccio[4]"]), td(["$ciccio[3]","$ciccio[7]"]), td(['',"$ciccio[9]"]), td(['',"$ciccio[10]"]), td(['',"$ciccio[11]"]), td(['',"$ciccio[14]"]), td(['',"$ciccio[15]"]), td([''," "]) ] ) );
now I want for the every entry that match I want some bottons to do stuff for example to ping this hostname and verify if it pings on the machine where it resides.. and others command that can run on the server.. and here start my problem..
print $q->start_form(-method=>'POST',-action=>'formDB.cgi'); print $q->hidden(-name=>'ping',-value=>"$ciccio[2]"); print $q->submit('PING'); print $q->hr; } } } #... if (defined ($pingalo = $q->param('ping'))) { open (FH,"ping -n 1 -l 1 $pingalo|"); while (<FH>){if ($_=~/(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})/){$risult +ato_ping=$1}} close FH; }
ID EST: I search for www.perl.it ... I find it out and I print a breakline, the table of results where the www.perl.it is a link to the site (until now all good..)then it appears a beatiful botton named PING and I want that if you click it in the table will appears in the first row at the third place the IP of the host ..

I whish other bottons that store their value and if u click it they runs command..

So, some summer suggestions sirs ??

greetings from sunny boiled roma
lor*

In reply to CGI command newbie question 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.