in reply to Export variables from perl to a bat file

It's often clearer to break up long command lines into bits.

You could try the multi-arg version of system, but I'm never quite sure what goes on under the covers and find myself guessing how to arrange for things to get interpolated and quoted correctly. DIY often seems easier to me.

Try:

system join ' ', 'psexec.exe', '\\\\aisfs01.gcps.k12', '-u username', '-p password', qq[ "e:\\psoft\\batfls\\$product{commandstop}" ] ;

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."

Replies are listed 'Best First'.
Re^2: Export variables from perl to a bat file
by coding_new (Sexton) on May 14, 2009 at 14:56 UTC
    Thanks guys. I took the recommendations of both posts above, and got it working, only to realize that the system does not capture the output. I ended up going the route of a backtick operator which will allow me to capture the output.