Hi #!/usr/bin/perl
open(FILE,'file') or die "Couldn't open $!"; while (1){ .. ... } } This is a sample code i am using to read a file Now the issue here is that the complete file gets loaded into memory at once and then the following job of parsing gets done. Is there a way i can just load a single line one at a time?? Also if the file(text contents) is a compressed file, which can be viewed with 'less' and catted by 'zcat' and uncompressed by 'uncompress' in linux, what's the best way to uncompress it on the fly??? At the moment i am uncompressing all of them. But i just want to know if i can do it by this method. Thanks Saurabh