in reply to indexing an array

This may help get you started if you have trouble with unpack :
sub Read_File { # An array of arrays to store the results my @items = (); while(<CLAIMS>) { # Extract the three fields into an array # and store a reference to it in @items push @items, [unpack("a8a6a2", $_)]; } # Display (for example) the 3d field in the 2nd line: print $items[1][2]; }
Updated : This is the same as tadman's AoA solution above and mr.nick's below...