If your value of $b always looks like your example, in that its a sequence of numbers with whitespace in between, you could just split them on whitespace. (Im not sure if the square brackets are actually part of the string or not)
Anyway, something like this:
# if the brackets are actually there:
$b =~ s/\[|\]//g;
my @values = split /\s+/, $b;
I use the most powerful debugger available: print!