'\x{00}\x{41}\x{00}\x{42}' =~ /(.{2})/s; # Two bytes 00 and 41. #### '\x{00}\x{41}\x{00}\x{42}' =~ /(.{2})/s; # Two chars NUL and A