in reply to Phonetic Translation
Update: Fixed missing ; in hash assignmentmy %trans = ( 1 => "one", 2 => "two", ... z => "zulu", ); foreach (split //, $line) { if (exists $trans{$_}) { print $trans{$_}, " "; } else { print $_, " "; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Phonetic Translation
by ellem (Hermit) on Aug 27, 2003 at 21:01 UTC |