in reply to How to increment a sequence number for evert instance of a value?
I changed the first part to a 3 step add thinking I messed up somewhere there it was originally this (and didn't work)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; } } }
if ($flag21 == 1) { foreach $num(@number) { if (($num) eq ($rp1)) { $seqi{$rp1} += 1; $invseq = $seqi{$rp1}; } else { snipped the rest off as it was the same
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: How to increment a sequence number for every instance of a value?
by aschroh (Novice) on Jun 26, 2003 at 19:47 UTC |