in reply to More efficient return of values from sub

I would say that getinfo should be an object, then you can partion the work easily latter. However here is a simple solution.
sub NAME { 0 }; sub ADDRESS { 1 }; sub routine_A { print getinfo()->[NAME], "\n"; } sub routine_B { print getinfo()->[ADDRESS], "\n"; } sub getinfo { my $name = "Sam"; my $address = "123 Main St"; return [$name, $address]; }
-- gam3
A picture is worth a thousand words, but takes 200K.