I generate a few variables in my tcl script which are actually used as switches for a perl script.
my switches are -X
, -Y
and -Z
, I store them in a variable, cmd
with
set cmd "-X -Y -Z"
I use exec to run the perl script in tcl like this:
exec ./script.pl $cmd
which throws an error: "Error: Unknown option x -y -z"
then I tried another way:
exec ./script.pl -- $cmd
For this particular case, the perl script gets executed but without the switches i.e. switches don't get activated.
Is there any way to resolve this?
-X -Y -Z
as one flag, you need to split them into three separate arguments. – ŹV -