Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
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 musing on the Monastery: (8)
As of 2019-02-22 09:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I use postfix dereferencing ...









    Results (117 votes). Check out past polls.

    Notices?
    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!