You are trying to load in 1Gb of memory a whole 3Gb file. Don't be surprised if you can't.
The most immediate answer would be to avoid to load the file entirely (by using while (<TEST>) {---} instead of @records = <TEST>;). But even in that case, the resultant hash won't fit in memory.
Could you please tell us more about your <key>=<value>format? Are they numbers? In what range? Are strings? do they follow a defined format? Maybe another approach can be used with your data.
citromatik
In reply to Re: Memory issue while opening and reading a file
by citromatik
in thread Memory issue while opening and reading a file
by koti688
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |