in reply to Re^2: Looping through a file, reading each line, and adding keys/editing values of a hash
in thread Looping through a file, reading each line, and adding keys/editing values of a hash
Interesting question.
One reason is that the OP already attempted a post-increment, and since the two increment types would produce the same outcome, why make the change?
Another reason is my personal preference for this counting situation. If, for example, I were on a sidewalk, tallying all the red cars that passed by, I wouldn't make a tally mark upon their approach (pre-increment), but rather after they crossed an imaginary line extending across the street from my position (post-increment).
Perhaps this ultimately boils down to personal preference, in cases like these...
|
|---|