Given this hash:
h = { "01"=>0, "02"=>0, "03"=>5, "04"=>6, "05"=>0, "06"=>0, "07"=>0, "08"=>7, "09"=>8, "10"=>0, "11"=>0, "12"=>0 }
how do I trim it to get this result:
h = { "03"=>5, "04"=>6, "05"=>0, "06"=>0, "07"=>0, "08"=>7, "09"=>8 }
that is, I want to remove the zero values from the beginning and the end of the hash.
You can use
breakto stop the execution.