http://www.perlmonks.org?node_id=985998


in reply to while loop with diamond operator

Strongly suspect this is an issue with how your Tomcat instance is configured. If I remember correctly (and maybe this has been fixed in Tomcat 6.0) Tomcat does not natively understand CGI straight out of the box and has no concept of invoking a Perl interpreter right out of the box.

There is a "how to" on this (external site) here and I'll put a sniglet of that howto here:

CGI support is implemented using the servlet class org.apache.catalina.servlets.CGIServlet. Traditionally, this servlet is mapped to the URL pattern "/cgi-bin/*".

By default CGI support is disabled in Tomcat.
Further into the how-to they explain that CGI is executed outside of the JVM that governs Tomcat.

Are you front ending Tomcat with Apache? If so, there is the possibility of getting Apache to handle the CGI portion of your app and let Tomcat do what it does best and serve as a web container for JSP and friends.


Peter L. Berghold -- Unix Professional
Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg