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


in reply to Question about ++ and hash value

++ is the auto-increment operator.
$hash{$line} is a hash assignment

So $hash{$line}++ auto-increments the value of $hash{$line}

Also please read Writeup Formatting Tips and use <code> tags around your code

grep
One dead unjugged rabbit fish later...

Replies are listed 'Best First'.
Re^2: Question about ++ and hash value
by ada (Novice) on Dec 09, 2007 at 00:01 UTC
    Ok thanks, so I guess that each value increases by how many occurances there are of the key in the hash. Is this the understanding?