Just another Perl shrine | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Rather than focusing on how to do this in as few characters as possible, consider doing it in a manner that is clear
produces @bits:
processing through @bits, you have to consider the possibility that the first character was a 'B', in which case $bits[0] will be B', in which case you convert to M's, otherwise the first part will convert to the odd pattern. Then a string of Bs, then the even pattern, and so on. As Occam said: Entia non sunt multiplicanda praeter necessitatem. In reply to Re: Tips on how to perform this substitution?
by TomDLux
|
|