Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Accessing Subroutine Arguments

by Juerd (Abbot)
on Apr 04, 2002 at 07:14 UTC ( #156599=note: print w/ replies, xml ) Need Help??


in reply to Accessing Subroutine Arguments

Or is it purely personal preference?

It is. I start using named arguments when a sub has more than two.

If does require that your sub names are logical, though.

readfile('foo.txt');
is already self-documenting, while
readfile( file => 'foo.txt' );
is redundant.

U28geW91IGNhbiBhbGwgcm90MTMgY
W5kIHBhY2soKS4gQnV0IGRvIHlvdS
ByZWNvZ25pc2UgQmFzZTY0IHdoZW4
geW91IHNlZSBpdD8gIC0tIEp1ZXJk


Comment on Re: Accessing Subroutine Arguments
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (12)
As of 2014-12-22 21:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (130 votes), past polls