sub doStuff { my $toggle = initToggle( 1 ); blah($toggle); } sub blah { my $t = shift; for ( 1..6 ) { print &$t . "\n" } }