in reply to Re: Argument Passing, preference or performance ?
in thread Argument Passing, preference or performance ?

I disagree. I prefer passing named arguments as a hash reference:

sub Open { my( $file, $opts )= @_; foreach $key ( %$opts ) { # ... } } Open( "file", { ReadOnly=>1, Retries=>2 } );
for the following reasons: But you need to be careful to not have your function modify the hash. (:

        - tye