Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Perl6 dot syntax (for methods?)

by stvn (Monsignor)
on Feb 28, 2005 at 14:57 UTC ( #435074=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub foo ($x) { say($x) }
    
  2. or download this
    sub foo ($x:) { say($x) }
    
  3. or download this
        sub foo($x, $y, $z) {...}    # expects three scalars
        @onetothree = 1..3;          # array stores three scalars
    ...
        foo(1,2,3);                  # okay:  three args found
        foo(@onetothree);            # error: only one arg
        foo(*@onetothree);           # okay:  @onetothree flattened to thr
    +ee args
    
  4. or download this
    sub perl6foo ($bar, $baz) { }
    
  5. or download this
    sub perl5foo { my ($bar, $baz) = @_; }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (6)
As of 2019-10-22 23:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?