in reply to
print behavior
While it doesn't explain your findings, the short answer is
don't try to use a variable twice in a single statement if there is code in that statement that modifies the value held in that variable
.
Comment on
Re: print behavior
In Section
Seekers of Perl Wisdom