Mega Code Archive

 
Categories / Perl / Statement
 

Use for loop to output the element one by one in an array

@array = ("one", "two", "three"); for ($loop_index = 0; $loop_index <= $#array; $loop_index++) {     print $array[$loop_index] . " "; }