[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [SpeechIO-12] speechd v0.39
This is another alternate, would it solve the 'd/l'?
while(($k,$v)=each %subs) { s/\b$k\b/$v/g; }
Hmm...maybe not, what if we build a search/replace string out of the keys?
something like this:
$search = join('|',keys(%subs));
$text =~ s/$search/$wordsub{$1}/eg;
hmm...
------------------------------------------------------------------------------
"Perl combines all of the worst aspects of BASIC, C and line noise."
-- Keith Packard <keithp@ncd.com>
mortis@voicenet.com http://www.voicenet.com/~mortis
------------------------------------------------------------------------------