sub stringRangeToList { my $foo = shift; $foo =~ s/-/../g; return eval $foo; } #### sub stringRangeToStringList { my $foo = shift; $foo =~ s/(\d+)-(\d+)/join ',',$1..$2/eg; return $foo; }