in reply to Ways of Passing Configuration Parameters
From there it is a piece of cake to pass multiples of these in the hash construct that you showed:sub some_func { my ($args) = @_; # if $args is a scalar, then make it an array ref $args = [$args] unless ref $args eq 'ARRAY'; # now process foreach my $arg (@$args) { # do stuff } } # sample calls: some_func($one_item); some_func([qw(bunch of items)]);
Hope this helps. :)some_func({ this => $one_item, that => [$some, $more, $items], });
Jeff
R-R-R--R-R-R--R-R-R--R-R-R--R-R-R--
L-L--L-L--L-L--L-L--L-L--L-L--L-L--
|
|---|