#!/usr/bin/perl $data_file = '/var/tmp/backup.txt'; use CGI; use Fcntl; use Getopt::Long; use CGI::Carp qw( fatalsToBrowser ); use CGI qw( :standard ); $query = new CGI; unless ($action = $query->param('action')) { $action = 'none'; } print <<"EndOfText"; Content-type: text/html EndOfText if ($action eq 'Search') { $comment = $query->param('comment'); open(FH, ">$data_file") or die "can't open $data_file: $!"; print FH $comment; close FH or die "can't close $data_file: $!"; } open (IN, "$data_file") or die "Can't open $data_file for reading: $!"; while () { @host = $_; $cmd = `bash /tmp/url.sh $host[0]`; #print "$cmd"; print redirect( "$cmd" ) } close IN or die "Can't close $data_file: $!"; print <<"EndOfText";

Add Logical:

Logical:
EndOfText