webelan has asked for the wisdom of the Perl Monks concerning the following question:
where $LL is the language code, and term is the term in that language. The subroutine remove_duplicates() just gets rid of excess letters so that @char contains only unique letters.use strict; use warnings; use diagnostics; use utf8; use open ':utf8'; use FileHandle; # lots of treatment in between .... then foreach $term_name (sort keys %term) { if ( defined $term{$term_name}{$LL}{term} ) { $text = $term{$term_name}{$LL}{term}; $char_1 = uc(substr($text,0,1)); push @char, $char_1; } } remove_duplicates(@char); @char = sort(@char);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Sorting utf-8
by Jaap (Curate) on Apr 24, 2003 at 09:53 UTC | |
by Anonymous Monk on Apr 24, 2003 at 10:31 UTC | |
|
Re: Sorting utf-8
by PodMaster (Abbot) on Apr 24, 2003 at 10:03 UTC | |
by Anonymous Monk on Apr 24, 2003 at 11:03 UTC | |
by dakkar (Hermit) on Apr 24, 2003 at 11:58 UTC | |
by Anonymous Monk on Apr 24, 2003 at 12:54 UTC | |
by webelan (Acolyte) on Apr 24, 2003 at 13:37 UTC | |
by Anonymous Monk on Apr 24, 2003 at 15:08 UTC | |
by richyboy (Acolyte) on Apr 24, 2003 at 21:58 UTC | |
by webelan (Acolyte) on Apr 24, 2003 at 12:53 UTC |