in reply to GetOptions getting a string

I agree with Your Mother that this is probably not a good idea. If you really need it, here is a way to do it.
C:\Users\Bill\forums\monks>type perl_script.pl use strict; use warnings; use Getopt::Long; my $temp; GetOptions("flag:s" => \$temp); my @flags = split /,/, $temp ; print join(' ', @flags,), ' ', scalar @flags, " strings\n"; C:\Users\Bill\forums\monks>.\perl_script.pl --flag 0 strings C:\Users\Bill\forums\monks>.\perl_script.pl --flag a a 1 strings C:\Users\Bill\forums\monks>.\perl_script.pl --flag a,b,c a b c 3 strings
Bill