$s="***ab***c"; $s=~s{\*}{\*\n} for 1..2; print$s; #### my output was: * **ab***c #### * * *ab***c
## my output was: * **ab***c ##
## * * *ab***c