You can help the shell to tokenize your command by enclosing arguments in quotes.
Run directly on a shell, that might look like this:
C:\> perl test.pl "C:/Path with spaces/foo.temp"
As to how you'd do that in VBScript, we can solve that with two steps: escape literal quotes in a string, and use Replace() to format that string.
sCmd = "perl test.pl ""{0}"""
sCmd = Replace(sCmd, "{0}", sArgs)
oShell.Run(sCmd)
This assumes that sArgs
only contains one argument; if you're passing multiple arguments, you'll want to wrap each of them in quotes individually.