If data.dat is opened as an array, how does one identity the variables?"

from this i take it that that is exactly how the file looks, if so, then toget the vars from it you can do it this way:

open FILE, "file.dat" or die "cannot open file.txt"; @array = <FILE>; #this has placed the 2 lines in this array, each line is its own var. close FILE;

# first we get rid of the return carriage and place all of them into 1 array @firstbit = split(/\|/, @array[0]); @secondbit = split(/\|/, @array[1]); foreach $bit (@secondbit) { push(@firstbit, $bit);} #push all of second bits info into the @firstbit array foreach $part (@firstbit) {print "$part\n";} # now we can print each one in the array out.

or to call to each one just use @firstbit[0], or @firstbit[3], ect....