On Mon, 18 Jun 2001, Paul wrote:

> > > I am having trouble understanding just what the following does,
> > > and how to you use it:
> > >
> > >  $hash{$_}++
> > >
> > >  i.e. are we increment the value or the key?
> >
> > The value.  If you wanted to increment the key, you would say
> > "$hash{$key++}".
>
> Wait a sec, brain cramp....
> Wouldn't that:
>   1) just access $hash{$key}
>   2) increment $key
>   3) add $hash{$key + 1}

Ya kow, I saw that when I sent it.  I think ++$key would be more
appropriate.

-- Brett
                                   http://www.chapelperilous.net/btfwk/
------------------------------------------------------------------------
The husband who doesn't tell his wife everything probably reasons that
what she doesn't know won't hurt him.
                -- Leo J. Burke

Reply via email to