Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^2: Advantages to passing a hash to a subroutine?

by alliswell (Novice)
on Jun 18, 2012 at 21:10 UTC ( [id://976903]=note: print w/replies, xml ) Need Help??


in reply to Re: Advantages to passing a hash to a subroutine?
in thread Advantages to passing a hash to a subroutine?

Thank you toolic

Can you give an example on how the arguments are self-documenting as compared to not using a hash?

Thank you!

  • Comment on Re^2: Advantages to passing a hash to a subroutine?

Replies are listed 'Best First'.
Re^3: Advantages to passing a hash to a subroutine?
by alliswell (Novice) on Jun 18, 2012 at 21:16 UTC

    I think I see the example of the self-documenting hash from tobyinc. It makes it more clear.

    perform_wedding( official => $smith, wife => $jones, husband => $brown, );

Log In?
Username:
Password:

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

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

    No recent polls found