Do you run the scheduled task as the same user as when you run the script interactively? Any error messages in Event Viewer? Try using "system("net use ....") or die "error $?";" to get the child process error in Event Viewer, or alternatively, write this error into a log file.
the hardest line to type correctly is: stty erase ^H