http://www.perlmonks.org?node_id=156599


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