Why do you need to log things at compile time? If your script can't compile, it'll do nothing, so why worry about it? And, if you're worried about non-attended execution of a script that may or may not compile, you've got larger issues. It's really easy to run 'perl -c script.pl' before deployment...even though you should probably do more testing than that. Also, I don't think you can just open STDERR like that...you have to close it first and re-open it to a file of your choosing.
thor
Feel the white light, the light within
Be your own disciple, fan the sparks of will
For all of us waiting, your kingdom will come