and once again, I lament the lack of the list in the reply-to field... On 3/7/06, Jay Savage <[EMAIL PROTECTED]> wrote: > On 3/7/06, DiGregorio, Dave <[EMAIL PROTECTED]> wrote: > > Ok, I am trying to run another perl script from a perl script and have > > had little luck in doing so. The main script is in one directory and > > the one it is controlling is in another directory. the main script > > starts and calls the other script which is supposed to read a file. > > However, I get can not find the "readfile" which is located in the same > > directory as the script called by the first. Now, if I run the called > > script by itself the problem goes away and all is good. So the problem > > I believe is caused by the CWD of the commanding script. To get around > > this I tried: > > > > > > > > chdir("C:\Go\Here\") || die "cant not change dir\n" ; > > > > system("perl someScript.pl -a createOperator -p f112a") || die "$_"; > > > > > > > > but it still does not work. Does anyone have an idea to get around this > > problem? > > > > > > You haven't given us much to go no here, but your best bet is going to > be giving 'readfile' as an absolute path, too, or doing chdir in the > second file. > > On a more general note, why use system to run a perl script? invoking > a second interpreter is a lot of overhead. See 'perdoc -f do', > instead. You may find that the chdir in your calling script sticks, > too. > > HTH, > > --jay > -------------------------------------------------- > This email and attachment(s): [ ] blogable; [ x ] ask first; [ ] > private and confidential > > daggerquill [at] gmail [dot] com > http://www.tuaw.com http://www.dpguru.com http://www.engatiki.org > > values of β will give rise to dom! >
-- -------------------------------------------------- This email and attachment(s): [ ] blogable; [ x ] ask first; [ ] private and confidential daggerquill [at] gmail [dot] com http://www.tuaw.com http://www.dpguru.com http://www.engatiki.org values of β will give rise to dom!