# not tested, but you get the gist sub makeitbig { return @_ ? shift @_ : 'xxx'; } sub testmode { return int( rand(makeitbig()) ); }