in reply to VBScript to Perl Script

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: