#!/usr/bin/perl -w
use CGI qw(:standard);

my $filename = param("file");
print header, start_html("Interaktives grep"), h1("Interaktives grep");
if ($filename) {
   print <<ENDE;
   <HTML>
      <HEAD>
      <TITLE>Interaktives grep</TITLE>
      </HEAD>
      <BODY>
      <EMBED TYPE=Nsgrep/mygrep WIDTH=100% HEIGHT=98% SRC=$filename>
      </BODY>
   </HTML>
ENDE
} else {
   print hr, start_form;
   print p("Dateiname (Lokale Dateien müssen mit file:/ beginnen)",
           filefield("file", 0, 50));
   print p(submit("Ok"));
   print end_form, hr;
}

