Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: Calling Functions

by GrandFather (Saint)
on Mar 28, 2012 at 08:39 UTC ( [id://962102]=note: print w/replies, xml ) Need Help??


in reply to Re: Calling Functions
in thread Calling Functions

Well done! No, you didn't post too quickly and you gain kudos for posting a follow up with the stuff you found and figured out. Once again: well done!

The perlsub (I recommend the more up to date perldoc.org link btw) is indeed the place to go for the god oil on this matter, although some of the subtle traps are not really highlighted.

As you found calling using & ignores prototypes. However as prototypes should almost never be used that is not a big issue. The more subtle potential trap is that the current contents of @_ is used as the argument list to the called subroutine if no explicit arguments are provided.

True laziness is hard work

Log In?
Username:
Password:

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

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

    No recent polls found