in reply to Re: Assigning the result of a chomp to the chomped var itself.
in thread Assigning the result of a chomp to the chomped var itself.
Assignment to a lexical scalar is often optimised away (as mentioned under "Performance Enhancements"). Various bugs related to this optimisation have been fixed. Certain operators on the right-hand side would sometimes fail to assign the value at all or assign the wrong value, or would call STORE twice or not at all on tied variables. The operators affected were $foo++, $foo--, and -$foo under use integer, chomp, chr and setpgrp.
|
|---|