http://qs321.pair.com?node_id=638544

pysome has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks,
pls help me check this issues: E.g:
$d = "123456789"; $d =~ s/(?<=\d)(?=(\d\d)+$)/-/g; print "$d";
It produce "1-23-45-67-89" ,it is OK.
But on the contrary,I wanna get a "left-to-right" substitution.That is ,i want to get "12-34-56-78-9"
I try :
$d =~ s/(?<=^(\d\d)+)(?=\d)/-/g;
It can't work.Where does it wrong? The wrong log:
Variable length lookbehind not implemented in regex; marked by <-- HER +E in m/(?<=^(\d\d)+)(?=\d) <-- HERE / at Noname1.pl line 4.
TIA.
Pysome