in reply to foreach loops

Check out List::MoreUtils natatime() as one way to do it.