develooper Front page | perl.beginners | Postings from December 2002

file into memory

Thread Next
Schwedler Kofoed
December 24, 2002 02:55
file into memory
Message ID:
Hi all,

I would like to open a file with the content:

peter 141444
oscar e324345
simon  j85547

in a perl script - but instead of reading the file one line at a time I
would like to suck the whole file into memory and processing each line from

I have tried to:

open FILE, "< tmp.txt";
@xx = <FILE>;
    while  $file(@xx)    {

but I cant get it to work  - where did I go wrong ?



Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About