S
saki80
Hi All,
I am calling perl scripts b.pl & c.pl from a.pl which takes three
arguments. I want to pass these command line arguments to b.pl & c.pl
also. so i could not do this by using 'system'. so ito continue my
work that time i hardcoded the parameters while calling b.pl & c.pl as
shown below
a.pl 1.1.1.1 1.1.1.2 1.1.1.3
a.pl
=========
..
..
..
system('b.pl', ip_address1);
system('c.pl', ip_address2, ip_address3);
where ip_address1, ip_address2 & ip_address3 are hardcoded vaules...
but if i use 'exec' in place of 'system', i could make use of the
ARGV(command line arguments for a.pl) as command line arguments for
b.pl & c.pl...
a.pl 1.1.1.1 1.1.1.2 1.1.1.3
a.pl
=========
..
..
..
exec "b.pl", $ARGV[1];
exec "c.pl", $ARGV[0], $ARGV[2];
but the problem is if i call two exec's , only one is getting
called..but if i use one at a time by commenting the other it is
working fine.
How can i call two exec one after the other so that both will execute.
Rgds
SaiKiran
I am calling perl scripts b.pl & c.pl from a.pl which takes three
arguments. I want to pass these command line arguments to b.pl & c.pl
also. so i could not do this by using 'system'. so ito continue my
work that time i hardcoded the parameters while calling b.pl & c.pl as
shown below
a.pl 1.1.1.1 1.1.1.2 1.1.1.3
a.pl
=========
..
..
..
system('b.pl', ip_address1);
system('c.pl', ip_address2, ip_address3);
where ip_address1, ip_address2 & ip_address3 are hardcoded vaules...
but if i use 'exec' in place of 'system', i could make use of the
ARGV(command line arguments for a.pl) as command line arguments for
b.pl & c.pl...
a.pl 1.1.1.1 1.1.1.2 1.1.1.3
a.pl
=========
..
..
..
exec "b.pl", $ARGV[1];
exec "c.pl", $ARGV[0], $ARGV[2];
but the problem is if i call two exec's , only one is getting
called..but if i use one at a time by commenting the other it is
working fine.
How can i call two exec one after the other so that both will execute.
Rgds
SaiKiran