in reply to system("./foo.pl") and a problem with relative paths in foo.pl

dellnak:

Update your calling script to switch to the appropriate directory before calling the script, like:

chdir("./dir"); system("./foo.pl");

...roboticus

Error checking left as an exercise for the reader.

  • Comment on Re: system("./foo.pl") and a problem with relative paths in foo.pl
  • Download Code

Replies are listed 'Best First'.
Re^2: system("./foo.pl") and a problem with relative paths in foo.pl
by dellnak (Initiate) on Nov 20, 2009 at 14:07 UTC

    Thanks to you (and cdarke equally)!

    Really basic, I am ashamed. But it works and therefore it was worth it.