# Call the Find_First function while($repeat_flag){ $repeat_flag = 0; %SEEN = (); # reset hash while(($k, $v) = each %GRAMMAR) { &Find_First($k, $v); } }