If keys can contain other values than \w, you might want to change that. Otherwise, this works just fine.$hash{$1} = substr($data, pos($data)+1, $2) while ($data =~ /(\w+)\[(\ +d+)\]/g);
In reply to Re: splitting string based on length index
by TedPride
in thread splitting string based on length index
by phi95aly
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |