For Programmers: Free Programming Magazines  


Home > Archive > PERL Beginners > November 2006 > Reading huge data into memory









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Reading huge data into memory
rahulthathoo

2006-11-03, 7:57 am

Hi

I have a huge data set with me. Its like over 10000 files each with
average 50KB of data. Assuming I have sufficient RAM, i need to be able
to load all this into memory so that when i have to look for it I dont
have to do an I/O. How do I go about this whole process in perl.

Rahul

rahulthathoo

2006-11-03, 7:57 am

when i print the result of the following code - it gives me just the
first
line of the file. What do u think is wrong?

my %table1=();
for($var=1;$var<2; $var++)
{
....
.......
.........
open A, $mov_i || die "Shit there is some prob here $!";
$table1{$var} = <A>;
close A;
}

foreach $row ($table1{1})
{
print "$row\n";
}



rahulthathoo wrote:
> Hi
>
> I have a huge data set with me. Its like over 10000 files each with
> average 50KB of data. Assuming I have sufficient RAM, i need to be able
> to load all this into memory so that when i have to look for it I dont
> have to do an I/O. How do I go about this whole process in perl.
>
> Rahul


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2009 codecomments.com