in reply to Cross-Platform code

I suggest putting the logdir specification in a config file. Put platform-specific variables in your config file, and have the app use those instead of hard-coding them throughout your application.

You can make Apache on Windows find the correct perl binary through the registry instead of the shebang line. That way you can leave it intact for use on Linux. (You can use the Apache directive ScriptInterpreterSource Registry).

Perl works fine on Windows using a forward slash as path separator, so you could drop that variable. For really spiffy cross-platform paths, I suggest File::Spec (look at the catfile function).