Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: prototypes: so many \@'s?

by ferreira (Chaplain)
on Apr 03, 2007 at 18:01 UTC ( [id://608121]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub foo ($$) { $_[0] + $_[1] } # add two scalar args :)
    
    foo(1,2) 
    @a = (1,2); foo(@a); # death !! not enough arguments
    @b1 = (2); @b2 = (3); foo(@b1,@b2) # 2 !?!?  = scalar @b1 + scalar @b2
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (5)
As of 2024-03-28 16:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found