Since I know some VBScript, I have a rough sense of what your program is doing, so I will give you some pointers to places in the Perl documentation that can help you:
- Since you are looking at environment variables, check out %ENV in perlvar
- for opening and writing to text files, look at perlopentut, open and print
- for creating subroutines, such as "LogMessage" and "CreateLogFile", look at perlsub
- if you really want to use objects such as WScript.Shell and Scripting.FileSystemObject in your Perl code (though you shouldn't), take a look at Win32::OLE