1 #!/usr/bin/perl 2 3 # Syntax: man2html <topic> <section> 4 5 # Print out a content-type for HTTP/1.0 compatibility 6 print "Content-type: text/html\n\n"; 7 8 if( $ENV{'REQUEST_METHOD'} eq "GET" ) 9 { 10 $buffer=$ENV{'QUERY_STRING'} ; 11 @ARGV = split(/&/,$buffer) ; 12 } 13 14 @manpage = `man @ARGV[1] @ARGV[0] | rman -f html -n @ARGV[0] -s 15 @ARGV[1]`; 16 17 print "@manpage";