#!/usr/bin/perl use strict; #print CGI header print "Content-type: text/html\n\n"; #defs #path to sql query my $sql_file='./oa.sql'; #path to realy application my $relay='./relay.pl'; #execute query open(FH, "perl $relay $sql_file |"); my @results=<FH>; close(FH); #Display results in html print "<html>"; print "<head><title>Example</title></head>"; print "<h2>Example</h2><hr>"; print "<body bgcolor=lightyellow>"; foreach(@results){ print "<pre>$_</pre>"; } print "</body>"; print "</html>";