laziness, impatience, and hubris | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I am extremely new to perl and working on my 1st perl code. I am stuck at a point, where I need to read a part of a file using Tie::File; My Old code:
But this could eat a lot of memory, as the files are huge. So I found Tie::File online, that happens not to load arrays in memory. 1st question, is that correct ? If yes, I get: tie @array, 'Tie::File', $filename or die ...;But I do not want to read the whole file. Let's say I want to read from line number 100 till end. How do I do it, using Tie::File ? something similar to: tie @array, 'Tie::File', "cat $InLogFilePath|tail -n +$InStartLineNumber" or die ...;Looking forward to your help monks :) In reply to Loading a part of the file to array using Tie::File by ansh007
|
|