Robert Davis [mailto:[EMAIL PROTECTED]] wrote: > > Sort of offtopic. This is the only way I was able to come up with to > show perl source on a web page. Anybody have any other methods? > I found the <pre> tag. Is there another tag that ignores tags? I did a > sub for < and > when in a print statement. > > bob > > #!/usr/local/bin/perl > use strict; > use CGI; > > print "Content-type: text/html\n\n"; > > [snipped code to recode perl code as HTML code]
hi bob, if the webserver is apache, you can simply override Apache's cgi-handler by putting a line like this line in the .htaccess file of the directory: AddHandler default-handler *.pl and then all .pl files should be viewed as plaintext in the browser. there are also perl modules which will read your perl source code, format it as syntax-colored HTML, and deliver that to the browser, but the only one i can seem to find at the moment will not work on pair cuz it requires mod_perl: http://search.cpan.org/search?mode=module&query=PrettyPerl wouldn't it be fun to modify this to work as a CGI...? -dave _______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users