for ($x=0;$<@array;$x++){ # .. do something with $array[$x] }