develooper Front page | perl.perl6.users | Postings from October 2018

need doc help with []

Thread Next
From:
ToddAndMargo
Date:
October 3, 2018 00:14
Subject:
need doc help with []
Message ID:
09153275-2f75-e9dc-473f-e1b23f593cf3@zoho.com
Hi All,

I use postcircumfix [] all the time.  But I don't
understand the documentation.

https://docs.perl6.org/routine/[%20]#language_documentation_Operators

would someone please explain what the crypto line means:

sub postcircumfix:<[ ]>(@container, **@index,
                         :$k, :$v, :$kv, :$p, :$exists, :$delete)

1  Why the <[]>?  I have always used [] with out the <>.
    Why would I want to use one over the other?

2)  Where does it state that the <> is optional?

3)  What is a **@?  *@ is a slurp all remaining.   A
     super duper slurp?

4)  What is :$k, :$v, :$kv, :$p, :$exists, :$delete
     and where are they defined?

5)  Why does :$k, :$v, :$kv, :$p, :$exists, :$delete
     have colons in front of them?

6)  Where is the --> return described?

Yours in confusion,
-T

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About