#! /usr/local/bin/perl $BASE ="/htdocs/userdirs/mhansen/tn111"; $ENV{PATH_INFO} =~ /([^\/]*)$/; print "Content-type: application/$ARGV[0]\n\n"; open(INCLUDE, "< $BASE$ENV{PATH_INFO}") || print("Cannot include file '$ENV{PATH_INFO}'"); while () { print "$_"; } close(INCLUDE); exit 0;