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

Re^3: Pass an optional parameter to a subroutine

by Velaki (Chaplain)
on Sep 15, 2006 at 17:54 UTC ( [id://573207]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Pass an optional parameter to a subroutine
in thread Pass an optional parameter to a subroutine

Exactly! What if someone sent in something like this?

foo(undef, 1, 2);
Then the @_ version would shift off the undef, which is not what is wanted, I think.

Being contemplative
-v.

"Perl. There is no substitute."

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2024-04-20 06:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found