in reply to Re: $var{el} += 1 vs $var{el} = $var{el} + 1 (varnames)
in thread $var{el} += 1 vs $var{el} = $var{el} + 1

The variable and key names have been changed to protect the (not so) innocent. We do have long-ish variable names as rule for clarity's sake (e.g. movementCount or movementType). It does sort of decrease readability, but increases comprehension six months later when a code review occurs.

  • Comment on Re^2: $var{el} += 1 vs $var{el} = $var{el} + 1 (varnames)

Replies are listed 'Best First'.
Re^3: $var{el} += 1 vs $var{el} = $var{el} + 1 (varnames)
by kennethk (Abbot) on Aug 14, 2013 at 14:22 UTC

    You may consider investing in lock_keys from Hash::Util. It fixes which keys are allowed in a hash, at the cost of a small amount of speed, and thus protects you from hash key typos.


    #11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.