#!/usr/bin/perl -wT # breaks up a string according to a separator @uri = split('/', $ENV{REQUEST_URI}); if ( $#uri > -1 && -e "/openwcms/data/$uri[1].html" ) { $request = "$uri[1]"; } else { $request = 'main'; } require '/openwcms/include/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