#!/usr/bin/perl use strict; use CGI qw/param/; use CGI::Carp qw/fatalsToBrowser/; my $file = $ENV{'REQUEST_URI'}; $file = '/index.html' if $file eq '/'; my $root = '/share/immute/htdocs'; my $files = '/files'; my $top = '/top.htm'; my $left = '/left.htm'; print "Content-Type: text/html\n\n"; print ""; use Data::Dumper; #print Dumper(\%ENV); unless ($file =~ /\.html?$/) { p_file("$root/$files/$file"); exit; } p_file("$root/$top"); p_file("$root/$left"); p_file("$root/$files/$file"); sub p_file { my $f = shift; open my $fh, '<', $f or die "Fileopen: $f because $!"; print while <$fh>; }