#!/usr/bin/perl -wT $request = 'main'; # breaks up a string according to a separator if(defined($ENV{REQUEST_URI})) { @uri = split('/', $ENV{REQUEST_URI}); if( $#uri > -1 && -e "/openwcms/data/$uri[1].html" ) { $request = "$uri[1]"; } } require '/openwcms/add_items.pl'; # domain is always the first thing in the string, pick the first element $domain = (split /\./, $head[0]{href})[0]; print "Content-type: text/html\n\n"; print < $head[0]{title} - $domain
eof open (FH, "/openwcms/data/$request.html"); while ($line = ) { chomp $line; # to remove the last trailing newline print $line; } close (FH); print <
eof