Solved passing variables between perl and batch files

March 14, 2013 at 00:46:03
Specs: Windows 7
I want to use single variable to indicate the status in both batch file and perl script .
I am calling a perl script in a bat file, I am able to modify common variable say, N in perl script but I am not able to get the same change in batch file.
I want the functionality similar to the environment variables in unix, which can be modified/accessed by multiple scripts. Request you to understand and help me out..

See More: passing variables between perl and batch files

Report •

March 14, 2013 at 05:43:55
✔ Best Answer
I'm pretty sure you'd run into the same problem in UNIX as well. Environment variables are one way; from parent to child. You can save your work from the child script to some temporary file, you can use the return code to propagate a number back, or you can use FOR /F to parse your child script's output, and add the variables there.

How To Ask Questions The Smart Way

Report •

March 15, 2013 at 05:56:04
Thank you .. I used FOR /F to capture script's output.

Report •
Related Solutions

Ask Question