Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: RFC: Destructuring Assignment (aka Unpacking aka Type Patterns) in pure Perl

by ikegami (Patriarch)
on Jul 03, 2020 at 20:03 UTC ( [id://11118884]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    [ a, b, ...rest ]                    // ES6
    { a:4, b:5, ...rest }                // ES6
    
  2. or download this
    [ $a, $b, @rest ]                    # Perl
    { a=>4, b=>5, %rest }                # Perl
    
  3. or download this
    [ a, b, ...[ c, d ] ]                // ES6
    { a:4, b:5, ...{ c:6, d:7 } }        // ES6
    
  4. or download this
    [ $a, $b, [ $c, $d ]->@* ]           # Perl
    { a=>4, b=>5, { c=>6, d=>7 }->%* }   # Perl
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11118884]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (2)
As of 2024-04-20 04:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found