split /(?<=..)/, $in;
I don't think that is going to do quite what you expected. It will split the string at every point that is preceded by two characters.
$ perl -le ' -> $str = q{abcdefg}; -> @bits = split m{(?<=..)}, $str; -> print for @bits;' ab c d e f g $
It seems that split is not perhaps the handiest tool for this task.
Cheers,
JohnGG
In reply to Re^2: Difficulties with split
by johngg
in thread Difficulties with split
by transiency
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |