in reply to GetOptions getting a string

Also from Getopt::Long see the section 'Options with multiple values'

It says :-

Often it is useful to allow comma-separated lists of values as well as multiple occurrences of the options. This is easy using Perl's split() + and join() operators: GetOptions ("library=s" => \@libfiles); @libfiles = split(/,/,join(',',@libfiles));