s/a/substr($b,0,1)/e ; s/b/substr($b,1,1)/e ; [download]
In reply to Re: regexp and a perl function by borisz in thread regexp and a perl function by Anonymous Monk