in reply to Re: Replacing with a variable in while loop
in thread Replacing with a variable in while loop
The entire script is well over 500 lines, and the mentioned snippet is an example of where I'm having problems. As well as I could probably loose my job for posting company source code on the Interwebz. I was just wondering why $var (or $_ which is equal to $var in this scenario) is not updating with each iteration of the while loop. I've done similar things with both Pascal and PHP. It just bewilders me why, in the given example, the variable will not update with each iteration of the loop. Obviously, it is because it is being used as a substitution. I was really just trying to understand the logic behind why. I've figured out a solution to the problem, using another method. But I'd still like to know the logic behind, the why.open(VAR, "<theinputfile.txt");
|
|---|