I don't think you are understanding the increment notation. To increment
$saveNum($dup}, all you want on the line is this:

$saveNum{$dup}++;


not:

$saveNum{$dup} = $saveNum{$dup}++;

Steve H.

-----Original Message-----
From: david wright [mailto:[EMAIL PROTECTED]]
Sent: Saturday, February 02, 2002 8:58 PM
To: [EMAIL PROTECTED]
Subject: Re: counting the recurrence of lines - du-oh,...


excellent, thanks for two great answers.  I actually tried (! defined)
but i tried it on  @storeList=<FILEIN>; which did not produce the
desired results at all : -(

John wrote:
"The reason you are getting the warnings is because of $saveNum{$dup} on
the right hand side of the expression.  Use either:
$saveNum{$dup}++;,..."

Oddly enough, the above incrementing does not work on this example!!!!
try it for yourself if you want. If you change $saveNum{$dup}
=$saveNum{$dup}+1;  to $saveNum{$dup} =$saveNum{$dup}++;  it will not
increment anything, this actually through me off for awhile because i
always write ++ (not +1) ,....

  well, i'll be $#%^&* i just ran the example with $saveNum{$dup} =
++$saveNum{$dup}; and it works exactly like i wanted, i didn't think
that would work?!,,....

oh yeah sorry about the multipul post's of the same question, first time
poster, they didn't show up for more then an hour, i didn't think they
would till i joined, blah, blah,.... ;-)

thanks again


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to