On 06/21/2017 10:26 PM, Brandon Allbery wrote:
On Thu, Jun 22, 2017 at 1:18 AM, Todd Chester <toddandma...@zoho.com
<mailto:toddandma...@zoho.com>> wrote:

    > On 22/06/17 14:49, Todd Chester wrote:
    >> I know how to read things on the command line.  But
    >> how to other's figure out what goes together when things
    >> don't arrive in order?

    On 06/21/2017 10:03 PM, Francis (Grizzly) Smit wrote:

        look into function MAIN in perl6



    But they have to be in order.

You want named parameters.

    sub MAIN(:$fixed-string, :$extended-regex, ...) {
      # $fixed-string and $extended-regex are Bools here,
      # True if the corresponding option specified

You should recognize this as being similar to named parameters work for
normal Perl 6 functions, but MAIN exposes them to the command line like
GNUish long options.

What does the ":" do?  and does it give you back the
value associated with it, if there is one?

Reply via email to