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
matgoldAsked:
Who is Participating?
 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.