#!/usr/bin/perl print ( "Content-type: text/html\n\n" ); use CGI; $query = new CGI; $act = $query->param( 'act' ); $name = $query->param( 'name' ); print <
EndofHTML if ( $act eq "List the titles" ) { # Remove leading and trailing spacing. $name =~ s/^\s*(\S*)\s*$/$1/; # For security, remove some Unix metacharacters. $name =~ s/;|>|>>|<|\*|\?|\&|\|//g; system ( "/usr/bin/java ListTitles '$name'" ); } elsif ( $act eq "Help" ) { system( "/bin/cat Help.html" ); } else { print( "No such option: $act" ); } print <
EndofHTML