user2223335
user2223335

Reputation: 209

Perl script call from Windows Batch file

I have a perl script which needs to be called from Windows batch file. Batch file script reads text file and pass the parameters to perl script. Now one of the argument is "User Input". Now if i give double quotes in text file the following error comes
Could not open : No such file or directory at perl_script.pl at Line 10
code is (echo the input and its showing as User Input on command prompt)
echo %INPUT%
perl perl_script.pl %INPUT%

Now if i give single quotes then the perl_script gets only User (Input is truncated)
Please suggest the best way to handle this

Upvotes: 4

Views: 14216

Answers (1)

Vicky
Vicky

Reputation: 13244

echo %INPUT%
perl perl_script.pl "%INPUT%"

Upvotes: 3

Related Questions