in reply to Referencing a Tie::File Array

$ra_list->[0] is the same as $list[0]. I'm not sure what you are asking, but if $list[0] doesn't do it, neither does $ra_list->[0]. Does that answer your question?

Replies are listed 'Best First'.
Re^2: Referencing a Tie::File Array
by citycrew (Acolyte) on Oct 01, 2011 at 02:38 UTC
    Thanks ikegami, I just wanted to confirm that when I use '$ra_list = getList()' it doesn't copy the data from 'return \@list' into memory at all, and it keeps the reference to that tie::file intact. I realize they are the same with a normal array, but tie::file is a different beast.
      Both returning the value and the assignment copy the value, but the value being returned is a reference, and that's a cheap operation.