in reply to Help! perl in scheduled task doesn't work!

You could try to print out %ENV in a scheduled task and compare it to one that is run on command line.

And you should check every action that could go wrong, for example if you use open somewhere in your script (you're not showing the whole script...)