Don't ask to ask, just ask | |
PerlMonks |
Re: Assigning the result of a chomp to the chomped var itself.by ikegami (Patriarch) |
on Nov 26, 2014 at 14:29 UTC ( [id://1108456]=note: print w/replies, xml ) | Need Help?? |
Generally speaking, you should avoid reading and modifying a variable in the same expression. You run into tricky and undefined areas.
Update: LHS being evaluated first wouldn't cause $x to get cleared.
In Section
Seekers of Perl Wisdom
|
|