http://qs321.pair.com?node_id=11100900


in reply to Re^2: Why does my get_max_index function return zero? (High Water Mark Algorithm)
in thread Why does my get_max_index function return zero? (High Water Mark Algorithm)

The $imax inside your for loop is different from the $imax outside it (as you've declared it with my inside the for loop). Remove that my.