in reply to Ubbi Dubbi
Cool. :)
A couple of little points, which -w would have told you about: "\1" is a way to refer to regexp backreferences within the regexp itself, but in the replacement part of a substitution it is preferable to refer to them as "$1". Also, ucfirst() does not modify a string in place but returns the modified form of the string, so that call does nothing: you could fix that by replacing the last two lines with print ucfirst;.
Note also that this would translate "The Angel" to "Thube ubAngubel"; assuming that "Thube Ubangel" would be preferred, you could use this trick to fix it up (not recommended for production code):
s/([aeiouy])/("ub"^$1^lc$1).lc$1/gie;
Hugo
ubbi "Rik ce"
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Ubbi Dubbi
by cciulla (Friar) on May 14, 2003 at 17:20 UTC |