code snippet as below.
print( __FILE__.__LINE__." $_ \n");# $_ correct
print( __FILE__.__LINE__." trace \n");
#not suffice if condition and didn't go here.
print( __FILE__.__LINE__." $_ \n");# $_ wrong
Problem description: As commented, the two print display different $_ in sequence. It seems only in $finder->isExist($_) could have changed the value of $_ unexpectedly. If a C++ function, it's probably because the called function's stack has been ruined by stack oveflowing. I'm not sure whether advanced language as Perl, will have this problem. Or why the passing value have been changed in my case?