For one thing you never change back to the initial (or main) directory. Do you have to change to that directory or can you just run "foo.exe" from the starting directory ie:
`./$_/foo.exe`
What platform are you writing this for? The commands you are running suggest a linux/unix platform but running a *.exe suggests Windows.
Lastly, (and I understand that this is perlmonks.org so props for using Perl) you might want to look into using a shell scripting language (such as bash).
In reply to Re: trouble with a simple script
by zek152
in thread problem running executable in subdirectories
by apollo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |