sub mysub($$;$) { my ( $a, $b, $c ) = @_; $c ||= 3; #c is 3 if not already defined }