in reply to perl and shell
then someone calls it like this:my $status = system ("fred.bash @ARGV");
and two arguments get passed. You also have a problem if the arguments contain shell meta-characters like quotes, $, or ! in the data, which must be 'escaped' before passing. So you end up having to do something like this before calling system:$ myscript.pl 'Program Files'
for (@ARGV) {$_ = "\Q$_\E"}
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: perl and shell
by dsheroh (Monsignor) on Jul 01, 2007 at 16:31 UTC |