- or download this
my @list = qw( a b c );
GetOptions ('list=s{,}' => \&list);
...
# modifies the file scoped @list array
@list = split /,/, $_[1];
}
- or download this
C:\test>list_test.pl
$VAR1 = [
...
'b',
'c'
];
- or download this
C:\test>list_test.pl -list d,s,4,f,"test string"
$VAR1 = [
...
'f',
'test string'
];