in reply to how do I open each line of a text file into seperate arrays?

And just one more way...
open(IN, "<foo.txt"); # This line does the work. # <IN> reads lines from the file, feeding that list to the map. # split(/\|/, $_) creates a list of the the pipe-delimted elements # [ ] creates an anonymous array ref to that list. # Finally the map returns the resulting list of array refs. my @foo = map { [(split(/\|/, $_))] } <IN>; close(IN); # Just to prove that it worked. foreach (@foo) { print join(' -- ', @$_), "\n"; }