Hi all,
>To start, I will assume the "@CmdList" versus "@list" bug is a typo or the
result of cutting down your program.
yes, exec @list , should be exec @CmdList.
Many of your examples assume that I know exactly how many parameters
I am passing to exec.
I should have in
I'm running on unix (5.6) and that is a cutnpaste of my working script.
'course it wrapped along the way ... what system are you useing? Did you
'unwrap' the array assignment line? What failure did you get?
I didn't ask the question, the spaces should be okay, but it also works
w/o them:
my @
This works:
#!/usr/bin/perl -w
use strict;
my @CmdList = ('/tmp/hello.pl', ' -p ', '"this is my parm"', ' -m ',
'"this is my message"', ' -o ', '"this is my option"', " data1 data2 data3
data4 data5");
print "cmd: ", @CmdList, "\n";
exec "@CmdList";
#!/usr/bin/perl -w
use vars qw($opt_m $opt_o $
Hi all,
I'm having a problem issuing an exec @list and then doing a
subsequent GetOptions (... call.
What I want to do is call exec with a list, so that shell
metacharacters aren't interpreted.
The called program should then use GetOptions to parse the command
switches pas