#!/usr/bin/perl -w $|=1; use CGI qw(:standard); #use IO::Handle; use FileHandle; print "Content-type: text/html\n\n"; print ' Page title '; open (my $cmds, "/var/www/cgi-bin/shell_script.sh |"); open (my $LOG, '>', '/tmp/perl.log'); select((select($LOG), $|=1)[0]); while (<$cmds>) { #print "
";
        print;
        print $LOG $_;
#print "
"; } close $cmds; close $LOG; print ' ';