Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Accessing Subroutine Arguments

by Juerd (Abbot)
on Apr 04, 2002 at 07:14 UTC ( [id://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

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2024-04-19 11:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found