Stuart White wrote: > Hey, thanks that worked! > > --- James Edward Gray II <[EMAIL PROTECTED]> > wrote: > <snip> > > I don't seen any reason to use the array at all, so > > I've removed it. > > If you had one that I just didn't know about, send > > it on back. > > That's how I tried to solve this piecewise, I thought > an array was necessary, or at least, it seemed logical > to me. (another example of TMTOWTDI) > I don't understand this syntax: > > $linehash{$1}++; > > I understand that $linehash{$1} refers to a single key > within a key value pair of the hash,
No. It represent the value. The key in this case is $1. > and I think the > ++ is for incrementing each player's line, but I don't > understand how it works. > Could you explain it to me? The derferencing operator {} takes higher precedence than the auto-increment operator, wso the auto-increment acts on the result of the expression $linehash{$1. That is it increments the value of the element referenced by $linehash{$1}. Joseph -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]