in reply to Re: Difficulties with split
in thread Difficulties with split
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
|
|---|