Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
Here's an updated version of the Perl 6 cheat sheet;
Perl 6 cheat sheet v2 SIGILS MAJOR/MINOR CONTEXTS ACCESS ARRAYS HASHES $scalar item list sink whole: @array[] %hash{} @array Str flat/slice element: @array[0] %hash{'a'} %hash Num lazy/eager/hyper (or) %hash<a> &code Bool slice: @array[0,2] %hash{'a','b +'} COMPOSERS (or) %hash<a b> TWIGILS [ ] array $normal-lexical { } block/hash AUTOMATIC DEREFERENCE $?compiler-constant < > quotewords &($foo)(1,2) == $foo(1,2 +) $*dynamic-or-global (,) parcel @($foo)[1] == $foo[1] $.public-accessor :() signature %($foo){'bar'} == $foo<bar +> $!private-attribute \() capture @(@($foo)[1])[2] == $foo[1][ +2] $^positional-param $:named-parameter CONTROL SYNTAX $=pod-info for LIST { } # implicit $_ ar +g $<named-match-capture> for LIST -> $a, $b { } # explicit args $~slang-variable while/until EXPR { } repeat while/until EXPR { } # do at least on +ce OPERATOR PRECEDENCE loop { } loop (a;b;c) { } # parens require +d! .method .[] i if EXPR { } elsif EXPR { } else { } ++ -- unless EXPR { } # no else allowe +d! ** given EXPR { when EXPR { } default { } } unary + - ~ ! ? ^ EXPR if EXPR for LIST; # list comprehensi +on * / % %% div next, last, redo # loop controls + - proceed, succeed # switch control +s x xx TYPES ~ Bool Bit Int Rat FatRat UInt Num Complex int32, complex64 e +tc. & Str Cat Blob Char Byte Codepoint Grapheme Buf buf8 buf32 ut +f8 | ^ IO Mu Any Cool Junction Whatever Mat +ch sleep abs sin temp Parcel Capture Signatu +re <=> leg cmp .. but SCOPE DECLARATORS Pair Range Set B +ag ~~ > == gt eq === eqv !op my lexical scope KeyHash KeySet KeyB +ag && our package scope Scalar Array Hash Co +de || ^^ // min max has instance scope Enum Order TrigBa +se ??!! ff anon no scope at all Block Routine S +ub = := op= => state persistent lexical Method Reg +ex so not augment benign parasitic Failure Excepti +on , : supersede deadly parasitic Instant Durati +on X Xop Z Zop ... Date DateTi +me say die map etc OPERATOR DOMAINS and Numeric: == !==(!=) + < > <=> <= >= or xor Stringy: eq !eq(ne) ~ lt gt leg le ge <== ==> Value: eqv !eqv before after cmp !after !befo +re ObjectID: === !=== METAOPERATORS LINKS IRC [op] reduce listop to A op B op C... #perl6 irc.freenode.n +et op= A = A op B #parrot !op !(A op B) »op« hyper/vectorize REGEX METACHARS REGEX MODIFIERS Zop zip with op ^ $ string begin/end :i ignore case Xop cross with op ^^ $$ line begin/end :m ignore marks Rop reverse args + one or more :g global Sop sequentialize * zero or more :r ratchet ? zero or one :s sigspace SPECIAL VARIABLES **1..3 repeat in range :4th nth occurrence $_ current topic () capture to $0,$1 :4x n times $/ regex result [] no capture $! error object <foo> subrule REGEX CHARCLASSES @*ARGS command line <[]> character class . == anychar, \N non +\n @*INC include path | parallel or \s == <space>, \S non %*ENV environment || serial or \d == <digit>, \D non $*PID process id « » word boundary \w == <+alpha+digit+[_ +]>

In reply to Re: Perl 6 version of cheatsheet by TimToady
in thread perlcheat by Juerd

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others rifling through the Monastery: (7)
    As of 2017-08-18 19:13 GMT
    Find Nodes?
      Voting Booth?
      Who is your favorite scientist and why?

      Results (309 votes). Check out past polls.