Hi,

On Thu, 24 May 2018 20:27:23 +0530
SATYABRATA KARAN <satyabratakara...@gmail.com> wrote:

> Hello,
> Does anyone guide me how to handle a huge file (>50GB) in perl?
> 
> I tried open method this way, but it's hanging the terminal. I think that
> is out of memory error internally.
> 
> open my $FILE, "<", "Log_file.txt";
> 
> while (<$FILE>) {
>  chomp;
>  some task;
>  ...
> }
> 
> close $FILE;
>

1. How long are the lines in the file?

2. Can you try https://en.wikipedia.org/wiki/Htop or similar to be sure?

 
> 
> Thanks,
> Satya



-- 
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
http://www.shlomifish.org/humour/bits/New-versions-of-the-GPL/

How many “one-liners” do I actually write? I don’t know; maybe a couple dozen
a day. But I guess I must be unusual, because as we all know, AWK was a
complete failure and vanished into obscurity since it didn’t address anyone’s
real needs. (That was sarcasm.) — “Twelve Views of Mark Jason Dominus”

Please reply to list if it's a mailing list post - http://shlom.in/reply .

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to