# if the brackets are actually there: $b =~ s/\[|\]//g; my @values = split /\s+/, $b;