in reply to Re: Referencing a Tie::File Array
in thread Referencing a Tie::File Array

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.

Replies are listed 'Best First'.
Re^3: Referencing a Tie::File Array
by ikegami (Patriarch) on Oct 01, 2011 at 03:32 UTC
    Both returning the value and the assignment copy the value, but the value being returned is a reference, and that's a cheap operation.