http://www.perlmonks.org?node_id=817632

di has asked for the wisdom of the Perl Monks concerning the following question:

I'm curious why

++$counts{$_} for <IN>;

takes about eight times as long as

++$counts{$_} while <IN>;

. Any explanations?

Update: Thanks for the replies.