in reply to Double quote problem

sharmadi,
MS-DOS batch file arguments are stored in the following variables:  %1 %2 %3 %4 %5 %6 %7 %8 %9 Unfortunately, you only get 9 so if there are more arguments than that you will have to shift them down to single digits. %0 is used for the batch file name itself.

So assuming you will never have more than 9 command line arguments you would do it like this:

@echo off c:\perl\bin\perl.exe myscript.pl "%1%2%3%4%5%6%7%8%9"
The arguments will be concatenated together and available inside the myscript.pl in the $ARGV[0] variable. If you need an example of how to handle more than 9 arguments let me know via /msg since that really isn't a perl question.

Cheers - L~R

Replies are listed 'Best First'.
Re^2: Double quote problem
by PhilHibbs (Hermit) on Feb 14, 2004 at 17:30 UTC
    In Windows NT, you can use %* to represent all parameters. I have not tried this with more than 9, though. I would say that this is close enough to on topic since it is to do with scripting, and many languishing in Windows Land end up wrapping their perl scripts in polyglot batch language.