laziness, impatience, and hubris | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Thanks for the times. But just to balance it out, yours could easily be considered the most straightforward:
(cleaned up a little):   $str =~ s/..(?!$)/$&:/g; says "insert a colon between each pair of characters" at least as clearly as any of the others. Slight update: That should be s/..(?=..)/$&:/g, to make the point about readability.   p In reply to Re: Re: More Help with Regex
by petral
|
|