Welcome to the Monastery | |
PerlMonks |
Re^2: confused pathby skyworld_chen (Acolyte) |
on Oct 10, 2012 at 06:39 UTC ( [id://998150]=note: print w/replies, xml ) | Need Help?? |
hi,
thanks for reply. Let me explain what happened in detail: I need to transfer a simulation package from one internal network to another internal network in company. Though both networks use linux, there are some differences between them, such as tools setting etc. here is a piece of code from one script (I did some substitution to make things simple):
above is the code. suppose code above is prog1. In line (4) a new project path is got. In this new project path there is a same script named prog1. The total code will get new project path and run the script in that path with the same script name "prog1" as line (6) indicates, i.e, runs B/prog1. This works well in original system, but in the other system, code in line (6) always runs A/prog1 so it is a infinite loop, which is a strange thing to me. In order to trace it, I insert a code as this between line (5) and (6) as (5.5) system("which $prog") and it shows B/prog1. I then inserted some debug info to make sure exec("$prog") runs itself. This confused me. so What happened? I confused...
In Section
Seekers of Perl Wisdom
|
|