Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

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

by Zero_Flop (Pilgrim)
on Jun 26, 2003 at 05:12 UTC ( [id://269113]=note: print w/replies, xml ) Need Help??


in reply to 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?

aschroh

Tomte answered your question, you can also "perldoc -q unique keys" Perldoc is great, but sometimes it's difficult to think of the key words you are looking for. (if you knew them, you probably wouldn't have to look them up). I have found it's best when just starting out to ask were to look rather than for the answer directly, it shows you want to learn instead of having someone do your HW.
  • Comment on Re: Re: How to increment a sequence number for evert instance of a value?

Replies are listed 'Best First'.
Re: Re: Re: How to increment a sequence number for evert instance of a value?
by aschroh (Novice) on Jun 26, 2003 at 14:20 UTC
    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 =)
      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; } } }

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://269113]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (3)
As of 2024-04-16 05:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found