Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: replace a character based on rule file

by karlgoethebier (Abbot)
on Dec 04, 2012 at 08:57 UTC ( [id://1007034] : note . print w/replies, xml ) Need Help??


in reply to replace a character based on rule file

TWTOWTDI:

#!/usr/bin/perl use strict; use warnings; my @words = qw{ door name dad naming }; print join ("\n", map { $_=~ s{(?<=na)m}{+d}; $_ } @words); __END__ door na+de dad na+ding

See map

Best regards, Karl

«The Crux of the Biscuit is the Apostrophe»