Forum Moderators: coopster & phranque

Message Too Old, No Replies

calling a perl script from another script..

         

prasannaperl

11:31 am on Jul 23, 2005 (gmt 0)

10+ Year Member



hi folks,
i am stuckedup with a problem.i wrote a perl1.pl script which enters into each users directory & there it has to run perl2.pl script.these 2 perl scripts are in "/users/xyz/abc" directory. perl1.pl takes me to the /users/ directory, & it has to run perl2.pl there. while doing so, its giving an error message "perl2.pl cant find". this is b'se perl2.pl is in /users/xyz/abc directory. again perl2.pl calls a shell script.how can i solve this problem related to path?

lexipixel

7:10 pm on Jul 23, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



#
# Throw this in your script and
# see if it help debug the paths
#
print 'Root = ' . $ENV{'DOCUMENT_ROOT'};
print 'Path = ' . $ENV{'PATH_TRANSLATED'};
#

WWMike

8:51 pm on Jul 23, 2005 (gmt 0)

10+ Year Member



You might want to include the entire path when calling the second script in case the first script is doing a CWD.