On Thu, Jun 22, 2017 at 1:18 AM, Todd Chester <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 >> >> https://docs.perl6.org/language/functions >> >> https://perl6advent.wordpress.com/2010/12/02/day-2-interacti >> ng-with-the-command-line-with-main-subs/ >> > > > 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. -- brandon s allbery kf8nh sine nomine associates allber...@gmail.com ballb...@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net