in reply to Store and match

Your data line is read into $_, but you are using $x for the match. To get separate the parts:
# $_ is the default buffer and pattern space while(<DATA>){ /^(\[\w+\])(.+)/; my $prefix = $1; my $values = $2; print "prefix:$prefix values:$values\n"; }
Not sure if you require the square brackets in your result or not. Note that \w does not include a comma, and that there are, of course, many other ways to do it.