in reply to Re^4: seeking advise on average value problem
in thread seeking advise on average value problem

That's fine if the only information you want to track is the input involving "joe_average". In fact, if you only want the data for this one name, and everything else can be ignored, you don't need the HoH -- just use one scalar to hold the count, and one to hold the sum.

But if you put "\w+" instead of the explicit string "joe_average" into the regex match inside the while loop, your one hash will collect the numbers for all the different names, and you can use them all or just the ones you are interested in.

  • Comment on Re^5: seeking advise on average value problem