Problems? Is your data what you think it is? | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
It is difficult to give you a turn-key solution since we do not know the format of your input data, but perhaps you can get some inspiration from the following:
The subroutine expects two parameters: the first is the name of the species and the second is the string of datapoints ("breaks" as you call them). It pushes the array_ref of the "breaks" on the @two_d_array and puts the name of the species as a key in the $dictionary hash with value the index of the corresponding "breaks" in the @two_d_array. As you can see in the output routine (line 20), we walk the $dictionary hash and pull out the corresponding "breaks" from the @two_d_array. CountZero A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James My blog: Imperial DeltronicsIn reply to Re^3: 2d array
by CountZero
|
|