On Thu, 2006-20-04 at 20:54 -0400, Tom Allison wrote: > Maybe I'm getting old, but I'm starting to thing that if there is a > method/sub/function/whatever that has more than one argument, one should > always > pass the args as a hash reference. This eliminates the problems of getting > the > variables out of order. > > It's probably slower and higher memory usage, but it seems to make sense. > > Any one else have suggestions on how to keep the args straight? >
The problem with using hashes is that a typo means the argument doesn't get passed. One of the things `use strict;` does is catch spelling mistakes. I find that many of my arguments end up as globals. That, of course, means my subroutines are not re-enterable (that is, without the clever use of `local`), but I tend to use loops rather than recursion. -- __END__ Just my 0.00000002 million dollars worth, --- Shawn "For the things we have to learn before we can do them, we learn by doing them." Aristotle * Perl tutorials at http://perlmonks.org/?node=Tutorials * A searchable perldoc is at http://perldoc.perl.org/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>