in reply to Re^2: Put multiple values as columns inside a hash
in thread Put multiple values as columns inside a hash

sorry for getting back to you late. what i mean is either you need to make the month part of the hash, e.g. assign explicitly $muteperc{$accession}{'month'} = whichever_month_need_to_assign. then when you're doing the output you can easily detect missing month or implicitly show (by printing month). Hope this makes sense.
in the past i've written a perl report that adds up summary data values, with many different slices of summary results required per month and quarter. rather than counting on particular month data being present, the final output routine was a for(1..12) that indexed into the convoluted hashes by month number. Whatever month indexed values didn't exist (no data) i made sure undef printed as zero.
on something related in doing summary calculations, can't remember what perl does when you divide by zero...but it ends up being a error with live data when values are missing or contain zero. so always put in an explicit check for divide by zero, before it bites.
have fun perl coding.
the hardest line to type correctly is: stty erase ^H
  • Comment on Re^3: Put multiple values as columns inside a hash