Hello,
i want to run one perl file from another and also want to pass parameters to it. how do it do that?
e.g.
lets say I have a file called parent.pl
in main.pl, i have two variables
$x = 'test1';
$y = 'test2';
i want to run a file , lets say child.pl, from main.pl
i did the following
`child.pl -x $test1 -y $test2`;
or used the system() function
My problem is , although the child.pl file runs, $test1 or $test2 dont get passed to child.pl from main.pl
Is there a way to do pass these values?
let me know
thanks
bcd
PS: child.pl is capable of accepting $test1 and $test2 as $opt_x and $opt_y respectively.
i want to run one perl file from another and also want to pass parameters to it. how do it do that?
e.g.
lets say I have a file called parent.pl
in main.pl, i have two variables
$x = 'test1';
$y = 'test2';
i want to run a file , lets say child.pl, from main.pl
i did the following
`child.pl -x $test1 -y $test2`;
or used the system() function
My problem is , although the child.pl file runs, $test1 or $test2 dont get passed to child.pl from main.pl
Is there a way to do pass these values?
let me know
thanks
bcd
PS: child.pl is capable of accepting $test1 and $test2 as $opt_x and $opt_y respectively.