• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 566
  • Last Modified:

how to pass variable from perl script to batch file

how to pass variable from perl script to batch file?
perl script:
$fpword = "xxxx";
system("D:\\test.bat %$fpword%");

batch script:
echo "%1", I'm getting blank
0
matgold
Asked:
matgold
  • 2
1 Solution
 
Adam314Commented:
system("D:\\test.bat $fpword");

or if $fpword might contain spaces:
system("D:\\test.bat \"$fpword\"");
0
 
matgoldAuthor Commented:
Great Thank You !!!!
I saw an example on Google that used "%", I guess that wasn't right
0
 
Adam314Commented:
The % is how a batch file would access a variable.
0

Featured Post

Learn to develop an Android App

Want to increase your earning potential in 2018? Pad your resume with app building experience. Learn how with this hands-on course.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now