in reply to split fixed string into character pairs
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.
|
|---|