The term for using a hash or pairlist that people have shown is "named parameters". Try searching here for many of the previous discussions and modules that help.
(In the perl core, CGI is a not-for-the-faint-of-heart example of a bastardized positional/named parameter scheme.)
Comment on Re: Optional parameter passing to a function??