--- trunk/bfilter.pl 2004/10/09 21:00:06 35 +++ trunk/bfilter.pl 2004/10/10 08:30:36 36 @@ -2,7 +2,6 @@ # use strict; -use locale; # maximum entries my $max = 0; @@ -62,27 +61,7 @@ push @lines, $_; } -# spaces will be ignored when sorting using locale. That's why we have -# cache of lines with spaces replaced by exclamation mark (!) so that -# sort order is strict and not dictionary. For more info, see: -# http://archives.postgresql.org/pgsql-sql/2002-04/msg00266.php -# http://groups.google.com/groups?selm=handler.82819.D82819.99045085113033.ackdone%40bugs.debian.org&output=gplain - -my %locale_space_fix; - -foreach (sort { - unless($locale_space_fix{$a}) { - my $tmp = $a; - $tmp =~ s/ /!/g; - $locale_space_fix{$a} = lc($tmp); - } - unless($locale_space_fix{$b}) { - my $tmp = $b; - $tmp =~ s/ /!/g; - $locale_space_fix{$b} = lc($tmp); - } - $locale_space_fix{$a} cmp $locale_space_fix{$b}; - } @lines) { +foreach (sort { lc($a) cmp lc($b) } @lines) { my @data = split(/\t+/,$_);