in reply to Search & Replace in an Array

See Simple Substitution , Arrays, and foreach in perlintro.