CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Advanced: how do i keep track repeated keys with different values.: Edit Log



subodheee
Novice

Dec 27, 2009, 9:18 PM


Views: 1843
how do i keep track repeated keys with different values.

hi,

i have a csv file with repeated keys with different values, i need to add values for the repeated keys. i tried using hashes but it takes the only last value. is there a way that i can keep track of repeated keys and add values for each repeated key.

example: am taking key as a time. same time 40:09.1 repeats for 4 times. for this 4 times i want to add correponding values. when i used hash this is not happening.

time value1 value2 value3
40:09.1 32.3 33.4 21.3
40:09.1 21.3 35.4 22.6
40:09.1 22.4 19.2 14.9
41:01.1 12.3 11.2 12.3
40:09.1 31.2 11.2 19.3

can anyone help me here.


(This post was edited by subodheee on Dec 27, 2009, 9:21 PM)


Edit Log:
Post edited by subodheee (Novice) on Dec 27, 2009, 9:21 PM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives