数组多叉树递归遍历 2015/12/14 17394 sub find_max_nest{ my($arr_name)=@_; $nest_counter++; if($nest_counter>$max_nest){ $max_nest=$nest_counter; } if($$arr_name[0] eq undef){ $nest_counter--; }else{ foreach $temp(@$arr_name){ find_max_nest($temp); } $nest_counter--; } }