in reply to command line and quotes
Since your primary concern is passing the arguments on correcty, why not do:
This depends on whether quotemeta does the kind of escaping you need, but it seems to be a reasonable start.@ARGV = map { quotemeta($_) } @ARGV; print "@ARGV"; __OUTPUT__ > perl test.pl -s "1 2 3" \-s 1\ 2\ 3
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: command line and quotes
by ambrus (Abbot) on Jun 02, 2006 at 11:38 UTC |