Re: AutoIncrement hash value

2002-12-14 Thread George Soulis
regards George - Original Message - From: Capacio, Paula J [EMAIL PROTECTED] To: Perl-Win32-Users (E-mail) [EMAIL PROTECTED] Sent: Friday, December 06, 2002 10:58 PM Subject: AutoIncrement hash value $hash{'A'} = '0'; #why doesn't this work... $hash{'A'} = $hash{'A'}++; #isn't

AutoIncrement hash value

2002-12-06 Thread Capacio, Paula J
I was using a hash to accumulate occurrences of a string (jobnames) in the file and I tried to use ++ to auto increment; but it didn't work. Since TMTOWTDI, I found an easy solution but I'm just curious as to why this doesn't work. Shouldn't the value of key 'A' be 2?; why doesn't ++ work or

RE: AutoIncrement hash value

2002-12-06 Thread Stovall, Adrian M.
-Original Message- From: Capacio, Paula J [mailto:[EMAIL PROTECTED]] Sent: Friday, December 06, 2002 2:59 PM To: Perl-Win32-Users (E-mail) Subject: AutoIncrement hash value I was using a hash to accumulate occurrences of a string (jobnames) in the file and I tried to use

RE: AutoIncrement hash value

2002-12-06 Thread Capacio, Paula J
-Original Message- From: Capacio, Paula J [mailto:[EMAIL PROTECTED]] Sent: Friday, December 06, 2002 2:59 PM I was using a hash to accumulate occurrences of a string (jobnames) in the file and I tried to use ++ to auto increment; but it didn't work. Since TMTOWTDI, I found an

RE: AutoIncrement hash value

2002-12-06 Thread Gerber, Christopher J
-Original Message- From: Capacio, Paula J [mailto:[EMAIL PROTECTED]] Sent: Friday, December 06, 2002 3:59 PM #why doesn't this work... $hash{'A'} = $hash{'A'}++; #isn't it logically equivalent to this? $hash{'A'} = $hash{'A'}+1; You can simply use: $hash{'A'}++; or: