in reply to string to array
It's hard to determine from a single, simple, example what you really want.@array = $str =~ /[^][,]/g; @array = $str =~ /[0-9]/g; @array = split ',', substr $str, 1, -1; @array = do {my %h = split //, $str; grep {defined} values %h};
|
|---|