in reply to Best Practice: How do I pass option parameters to functions?
I would probably put most of that into a config hashref to make it simpler to pass around and allow it to expand without breaking all your functions later.
processDirs($config, @dirs) ... sub processDirs { my ($config, @dirs) = @_; print "Processing Dirs...\n" if $config->{verbose} > 0; system($config->{script}, $_) for @dirs; }
|
|---|