in reply to Getopt::Long defaults for options with multiple values

You can use a subroutine reference and pass a comma separated list to accomplish your goal.

my @list = qw( a b c ); GetOptions ('list=s{,}' => \&list); print Dumper \@list; sub list { # action at a distance # modifies the file scoped @list array @list = split /,/, $_[1]; }

test without passing any arg:

C:\test>list_test.pl $VAR1 = [ 'a', 'b', 'c' ];

test passing arg list:

C:\test>list_test.pl -list d,s,4,f,"test string" $VAR1 = [ 'd', 's', '4', 'f', 'test string' ];