Hi Monks,
I am using following tie process to load large files into an array. Some of the files will be over a gig so I don't want any mem usage at all. I want to confirm that referencing $ra_list->[0] will not recreate the list into memory at all. I know that it won't on a standard array ref but this is a tie::file and I don't know if they work differently in that respect.
my $ra_list = getList(); my $line1 = $ra_list->[0]; sub getList { my @list; tie(@list, 'Tie::File', '/path/file', memory => 0, mode => O_RDONLY) +; return \@list; }
In reply to Referencing a Tie::File Array by citycrew
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |