Problems? Is your data what you think it is? | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I currently have a big, ugly, repetitive, procedural way of doing this:
For every instance of ##REPLACE##, insert the next element of an array. I was hoping there was some way I could use the \G and //g operators with an s//$rep/ where $rep=shift(@array) operation in order to make it work, but my attempts have failed with unexpected results (sometimes multiple ##REPLACE##(s) in the same line will get ignored, sometimes not.) Has anyone tried doing something similar, or perhaps someone with much more REGEX experience has input? Thanks, cidaris In reply to Sequential Replacement by cidaris
|
|