addady
asked on
Perl system function
Perl system function
How can I control from what directory the call to the system will be dome
I want the perl script to call other perl script in other dir
some thing like this:
----/home/a.pl------------ ------
#!/usr/local/bin/perl
system ("cd /home2/rami");
system ("prel B.pl");
B.pl will work only if is call from
dir /home2/rami
Any other idea how a.pl can call b.pl
are wellcome
Regards,
Rami
How can I control from what directory the call to the system will be dome
I want the perl script to call other perl script in other dir
some thing like this:
----/home/a.pl------------
#!/usr/local/bin/perl
system ("cd /home2/rami");
system ("prel B.pl");
B.pl will work only if is call from
dir /home2/rami
Any other idea how a.pl can call b.pl
are wellcome
Regards,
Rami
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
chdir '/home2/rami';
system "perl B.pl";
#or
do '/home2/rami/B.pl';