Great hack, Thanks Philipp. One thing though, to get it to work in NT/IIS, you have to add the following before the required files line:
#If you are running UBB on IIS,
#you may need to add the following line
#if so, just remove the "#" sign before the print line below
#print "HTTP/1.0 200 OKn";
print ("Content-type: text/htmlnn");
eval {
($0 =~ m,(.*)/[^/]+,) && unshift (@INC, "$1"); # Get the script location: UNIX / or Windows /
($0 =~ m,(.*)\[^\]+,) && unshift (@INC, "$1"); # Get the script location: Windows
#substitute all require files here for the file
Also add a closing bracket to last line.
Cheers