in reply to split fixed string into character pairs

In list context, a regular expression will return the elements of its capture buffers. This means

my ($var1, $var2, $var3) = /(.{2})(.{2})(.{2})/;

or even:

my (@array) = /(.{2})(.{2})(.{2})/;

will do what you need and avoids a bunch of potential scoping issues. See Extracting matches in perlretut.