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


in reply to Predefining sub Parameters

This might help you: TheDamian's Perl Best Practices Beta Chapter

See the section on "Named Arguments".

Of course, that will only be up for a short time. Here's a quick list of other sources:

named arguments
How to pass a variable to function selected from a hash
Recipe 10.7 Passing by Named Parameter in Perl Cookbook, 2e (at least, it's 10.7 in my first edition).

-QM
--
Quantum Mechanics: The dreams stuff is made of

Replies are listed 'Best First'.
Re^2: Predefining sub Parameters
by willyyam (Priest) on Jun 23, 2005 at 16:43 UTC

    Useful references, all. The Best Practices book looks like it'll be a winner. The problem for me is that I'll only be able to understand the first third of any given chapter, if the beta chapter is any indication. Oh well, I bought the Camel book years ago, and most of it still makes my head spin :-)

      The problem for me is that I'll only be able to understand the first third of any given chapter, if the beta chapter is any indication.
      Perl is very accommodating. If you only need 10%, that will work. If you don't need it, it generally isn't required.

      -QM
      --
      Quantum Mechanics: The dreams stuff is made of