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.
In reply to Re: split fixed string into character pairs
by kennethk
in thread split fixed string into character pairs
by raybies
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |