in reply to Re: Re: How to increment a sequence number for evert instance of a value?
in thread How to increment a sequence number for evert instance of a value?

I agree, I wasn't looking so much for a "here it is use it". I just was lost and not sure how to even approach this. I did a lot of reading on hashes and updating values in hashes last night and now I understand what he was referring to. I appreciate everyones input =)
  • Comment on Re: Re: Re: How to increment a sequence number for evert instance of a value?

Replies are listed 'Best First'.
Re: Re: Re: Re: How to increment a sequence number for evert instance of a value?
by aschroh (Novice) on Jun 26, 2003 at 15:09 UTC
    Ok this is what I came up with but when I print the output to the screen $invseq has no value. Can anyone see what am I doing wrong....it looks alright to me. Am I using the hash incorrectly?
    if ($flag21 == 1) { foreach $num(@number) { if (($num) eq ($rp1)) { $invseq = $seqi{$rp1}; $invseq = $invseq + 1; $seqi{$rp1} .= $invseq; } else { $seqi{$rp1} .= 1; $invseq = $seqi{$rp1}; push @number, $rp1; } } }