in reply to splitting string based on length index
$hash{$1} = substr($data, pos($data)+1, $2) while ($data =~ /(\w+)\[(\ +d+)\]/g); [download]