the above example would returnsAList, put it in a new array reference, then dereference it. probably not want you want.
To get the first item from the sub with [] notation would be (returnsAList)[0]
perl -e 'sub returnsAList { return 0..5 }; $v = (returnsAList)[3]; warn $v'
the above example would returnsAList, put it in a new array reference, then dereference it. probably not want you want.
To get the first item from the sub with [] notation would be (returnsAList)[0]
perl -e 'sub returnsAList { return 0..5 }; $v = (returnsAList)[3]; warn $v'