in reply to chdir in CGIs, taint mode and mod_perl

I won't comment on the security of your attempt, but you should at least use /(.*)/s in case the string has a newline.

And yes, CWD may contain a newline.

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.