Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re: Question about ++ and hash value

by grep (Monsignor)
on Dec 08, 2007 at 23:46 UTC ( #655899=note: print w/replies, xml ) Need Help??

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

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?

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://655899]
[liz]: ^10 is just a short way of saying 0..^10, which is a short way of saying 0..9
[liz]: ^N is a very common idiom in Perl 6 to indicate "N times"
[liz]: The ^ indicates "exclude endpoint from range"

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (9)
As of 2018-07-16 17:01 GMT
Find Nodes?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?

    Results (344 votes). Check out past polls.