my ($source,$typ,$offset,$data)=($1,$2,hex($3),$4); my @data=unpack("(a2)*",$data); $matrix[$typ][$offset]=\@data;