http://www.perlmonks.org?node_id=814806


in reply to Find average for time(Hr:Min:Sec)

You've got an answer, with code, so I'm going to give you some generic advice.

When you're being asked to average or total anything, your first step will be to convert everything to a standard unit (for time, I'd pick seconds), do the arithmetic with that unit, and then convert it to something that is easier for people to read (I'd be happy with an answer like 85 531 seconds, but that's just me). Obviously, some error checking is required, including the obvious checks to make sure that the H:M:S times don't include nonsense, like 4:103:99


Information about American English usage here and here. Floating point issues? Please read this before posting. — emc