- or download this
$d = "123456789";
$d =~ s/(?<=\d)(?=(\d\d)+$)/-/g;
print "$d";
- or download this
$d =~ s/(?<=^(\d\d)+)(?=\d)/-/g;
- or download this
Variable length lookbehind not implemented in regex; marked by <-- HER
+E in m/(?<=^(\d\d)+)(?=\d) <-- HERE / at Noname1.pl line 4.