>> Does this work as a perl script?
No, it does not. When placed on the server and accessed remotely via a web browser, this is the output that appears in the browser:
Content-type: text/html
'W:\mysite.org\web\test.pl' script produced no output
When you look at the Perl log, you find this...