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.