skyworld_chen has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
I have two programs with the same name, suppose its name is $prog1 and one is under diretory A and the other is under directory B. I just use FindBin and other modules provided by internal groups to find the path with B, then I do this:
system("which $prog1"), it shows B/prog1, but if I do this:
exec("$prog1"), I found the code A/prog1 is running. I was confused here. Can anybody help me? Thanks very much.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: confused path
by choroba (Cardinal) on Oct 09, 2012 at 08:32 UTC | |
by skyworld_chen (Acolyte) on Oct 10, 2012 at 06:39 UTC | |
by parv (Parson) on Oct 10, 2012 at 07:13 UTC | |
by skyworld_chen (Acolyte) on Oct 10, 2012 at 12:44 UTC | |
by Anonymous Monk on Oct 11, 2012 at 04:14 UTC | |
by parv (Parson) on Oct 09, 2012 at 09:00 UTC | |
by choroba (Cardinal) on Oct 09, 2012 at 09:59 UTC | |
by tobyink (Canon) on Oct 09, 2012 at 10:44 UTC | |
by Anonymous Monk on Oct 09, 2012 at 14:55 UTC | |
Re: confused path
by parv (Parson) on Oct 09, 2012 at 08:30 UTC |
Back to
Seekers of Perl Wisdom