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