# get url substring from $ENV{'QUERY_STRING'} $filename = $ENV{'QUERY_STRING'} open(FILE, $filename) or dienice("cannot open file $filename : $_[0] $!"); @LINES = ; close(FILE); print "Content-Disposition: attachment; filename=$filename\n\n"; for $i (0..$#LINES) { print $LINES[$i]; }