@trial_array = ("first", "second", "third"); #### $sec_el = $trial_array[1]; #### "this is a data file. This ie read in array. this is looped through" #### $datafile = datacapture.cgi; open(DAT, $datafile); @data_array = ; #### foreach $loopvariable (@data_array) { print $loopvariabe ; }