PetaMem has asked for the wisdom of the Perl Monks concerning the following question:
I'm refactoring code of a former colleague, who sometimes was brilliant implementing things, and sometimes - well...
I stumbled across a module where he uses tons of these constructs:
Standalone - not as right value of anything. Looking at the context (no context for the hash), I think the whole construct is equivalent to:$outhash{$str} ? ($outhash{$str}++) : ($outhash{$str} = 1);
Or am I overseeing some "important" side effect? Thanks for sharing your insight.$outhash{$str}++;
Bye
PetaMem All Perl: MT, NLP, NLU
|
---|