Your skill will accomplish what the force of many cannot |
|
PerlMonks |
String replacementby wallacei (Initiate) |
on Jul 21, 2005 at 13:36 UTC ( [id://476824]=perlquestion: print w/replies, xml ) | Need Help?? |
wallacei has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monks,
I would like to place "-" into string A based on the position they are in string B. Basic Idea: ABABA goes to AB--A-BA based on template BB--B-BB I can do this just by looping over the two strings, as below, but I am wondering if there is a neat perl way of doing it with out using loops? Thanks for your guidance!
Back to
Seekers of Perl Wisdom
|
|