in reply to Creating an array from a text file
We're going to need some more information about this. Populating an array from a text file is easy:
open FILE, "< $somefile" or die "Cannot open $somefile for reading: $! +"; chomp( my @file_data = <FILE> ); close FILE or die $!;
At this point, @file_data will contain the individual lines of the file (assuming you haven't changed the $/ variable). Is the above enough for you, or do you have more questions? Showing us your code might help, too.
Cheers,
Ovid
Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.
|
|---|