Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

[Perl6] Slurpy array of named arguments?

by ctilmes (Vicar)
on Dec 05, 2016 at 14:16 UTC ( #1177215=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    class testing {
        method newhash(*%args) {
    ...
    my $y = testing.newarray(c => 3, d => 4);  # Looks good, but doesn't w
    +ork
    
    my $z = testing.newarray('e', 5, 'f', 6);  # Works, but ugly
    
  2. or download this
    Hash Key b => Value 2
    Hash Key a => Value 1
    Array Key e => Value 5
    Array Key f => Value 6
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1177215]
Approved by marto
Front-paged by LanX
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2022-10-03 13:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred way to holiday/vacation is:











    Results (14 votes). Check out past polls.

    Notices?