The multi-line approach is probably my most realistic fallback, and I must confess that this has (for me) turned into a bit of an academic exercise, just for fun.
I did briefly consider a soundex encoding (metaphone actually), but I couldn't find a suitable encoding. Text::Soundex gives results like 'E460' and 'L222', and Text::Metaphone gives results that are in some cases worse than my Initials hack -
D:\tmp>cat metaphone.pl use Text::Metaphone; print $_,' => ', Metaphone($_),"\n" for map {chomp;$_} <DATA>; __DATA__ Stephen Thrasher Steve Trasher D:\tmp>metaphone.pl Stephen Thrasher => STFN0RXR Steve Trasher => STFTRXR D:\tmp>initials.pl Stephen Thrasher => StTh Steve Trasher => StTr D:\tmp>
In reply to Re: Re: Generate unique initials from a list of names
by EdwardG
in thread Generate unique initials from a list of names
by EdwardG
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |