Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^3: Odd behaviour of chomp()

by sundialsvc4 (Abbot)
on Oct 21, 2015 at 14:14 UTC ( #1145557=note: print w/replies, xml ) Need Help??


in reply to Re^2: Odd behaviour of chomp()
in thread Odd behaviour of chomp()

The corrected example merely repeats the originally reported bug.

Certainly won’t be the first time that an optimizer produced incorrect results.   Delphi-6 had a similar bug, too, that vexed me for a time.   It is almost a general rule-of-thumb that, if calling any function that modifies one of its inputs, do not assign the result back to the same variable.   Optimizers like to remove “unnecessary” loads and stores, and they like to re-order things, and it becomes a gray area.   Just put the result down someplace else.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1145557]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (7)
As of 2019-07-16 16:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?