in reply to Re^3: setting values inside subroutine
in thread setting values inside subroutine

I dont know what you're trying to do , maybe this but its hard to tell
sub temp { my( $t, $r_ref ) = @_; sample( $r_ref->[0] ); }