perl -lwe 'use strict; print(join("/",split(/(?!\.\d)/,"123.456.78.1")))'In your code you have a negative look-ahead assertion (?!\.\d).
The idea is that a split point is any point in the string which is preceeded by a dot followed by a digit.
In reply to Re: split on zero-length pattern
by tinita
in thread split on zero-length pattern
by rovf
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |