in reply to Subroutine's output as input to a subroutine

I have no idea what you're trying to do, but you're missing a closing } and get rid of the &
sub makeitbig { my $default_value = 'xxx'; if (@_) { $default_value = shift; } return $default_value; } sub testmode { my $random1 = int( rand(makeitbig()) ); return $random1; }
BTW, this could be rewritten:
# not tested, but you get the gist sub makeitbig { return @_ ? shift @_ : 'xxx'; } sub testmode { return int( rand(makeitbig()) ); }