[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]



At any rate, yes it's quite feasable to pass key => value params, then
in your sub do something along the lines of:


sub foozle {
  my %defaults = ( wonkle => 'zorbnats',
                   fleegle => 'wubba wubba', );
  my %args = ( %defaults, @_ );

  if( exists $args{ optional } ) {
    ## ...
  }

  print "fleegle: ", $args{ fleegle }, "\n";
}


-- 
Fletch                | "If you find my answers frightening,       __`'/|
fletch at phydeaux.org   |  Vincent, you should cease askin'          \ o.O'
                      |  scary questions." -- Jules                =(___)=
                      |                                               U


</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<ul><li><strong>Follow-Ups</strong>:
<ul>
<li><strong><a name="00794" href="msg00794.html">[ale] Perl Question</a></strong>
<ul><li><em>From:</em> jkinney at localnetsolutions.com (James P. Kinney III)</li></ul></li>
</ul></li></ul>
<!--X-Follow-Ups-End-->
<!--X-References-->
<ul><li><strong>References</strong>:
<ul>
<li><strong><a name="00785" href="msg00785.html">[ale] Perl Question</a></strong>
<ul><li><em>From:</em> cfowler at outpostsentinel.com (Christopher Fowler)</li></ul></li>
</ul></li></ul>
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg00792.html">[ale] local mailserver and POP3</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00794.html">[ale] Perl Question</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00785.html">[ale] Perl Question</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00794.html">[ale] Perl Question</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00793"><strong>Date</strong></a></li>
<li><a href="threads.html#00793"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>

<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>