for ($c=0; $c < scalar(@cont_names); $c++) { # do stuff with $cont_names[$c] }