Syntactic Confectionery Delight | |
PerlMonks |
Re: replace a string multiple timesby choroba (Cardinal) |
on Nov 15, 2014 at 08:12 UTC ( [id://1107285]=note: print w/replies, xml ) | Need Help?? |
The quantifiers (like {3}) make sense in regular expressions. You used one in the replacement part, though, which is a pure string (and even if it worked, where would the spaces be?). There is no easy mechanism how to introduce repetition into a string, you have to call a function:
YMMV, but I think plain s/int/int int int/g is clearer.
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
In Section
Seekers of Perl Wisdom
|
|