in reply to How to process named parameters that have the same key name?

As AWTDI, I offer the following.

use Getopt::Long; sub simple_call { my @params = qw( animal fish insect ); my $self = shift; local @ARGV; push @ARGV, '--'.shift, shift while @_; GetOptions( \(my %opt), map $_.'=s@', @params ); # now use %opt. each value is an arrayref. }
We're building the house of the future together.