Hi All,

I am reading up on subroutines over at:

The above states:

       In a subroutine declaration, named parameters must come after
       all required and optional positional parameters. Named parameters
       are treated as optional by default unless they are followed by a !.
       Actually, you can put a ! after required positional parameters as well,
       but that's the default.
    sub mySub(
        :$name!,             # Required
        :$type,              # Optional
        :$method?            # Still optional

Is their example a boo-boo? 
    :$type,  # Optional

How is this "optional" when "!" is the default?

What am I missing?

Many thanks,

I am Windows
I am the Blue Screen of Death
No one hears your screams

Reply via email to