in reply to Re: Regex split string into n-length
in thread Regex split string into n-length

use 5.009005; $string =~ s/\w{3}\K/-/g;

Replies are listed 'Best First'.
Re^3: Regex split string into n-length (\K 5.010)
by kcott (Archbishop) on Sep 10, 2013 at 07:52 UTC

      Hi Ken,

      You are absolutly right. Thank you for showing this error.

      Look at my update.

      McA

Re^3: Regex split string into n-length (\K 5.010)
by McA (Priest) on Sep 10, 2013 at 07:52 UTC

    \K, these are the little pearls in Perl. ++

    Thank you

    McA