http://qs321.pair.com?node_id=287877


in reply to Re: Re: Help me improve this sub with named params!
in thread Help me improve this sub with named params!

I thought of doing something similar, but on the off chance that foobar( valid_arg => undef ); would be actually allowed I wrote what I did. Your code wouldn't be able to distinguish that call from a call that omitted the valid_arg parameter. Also, you'd have to add slightly more code to get key,value pairs (instead of just iterating over the values as you are now). But yours probably is nicer if we don't need to worry about undef parameter values.

blokhead