in reply to Locale Woes...

You don't want LC_TYPE, you want LC_COLLATE for that:
use locale; use POSIX qw(locale_h); setlocale(LC_COLLATE,"de_DE") or die "foo? - $!\n"; print "yup" if "fähler"=~/^\w+$/; __END__ yup

--shmem

_($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                              /\_¯/(q    /
----------------------------  \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}

Replies are listed 'Best First'.
Re^2: Locale Woes...
by andreas1234567 (Vicar) on Jun 04, 2007 at 13:13 UTC
    I can't get shmem's solution to work unless I add use utf8 and operate on LC_CTYPE. Based on the Location, one might guess that shmem's LC_CTYPE is already 'de_DE'?
    $ perl -l use strict; use warnings; use locale; use POSIX qw(locale_h); print setlocale(LC_COLLATE,"de_DE") or die "foo? - $!\n"; ("fähler"=~/^\w+$/) ? print "yup" : print "nope"; __END__ de_DE nope
    $ perl -l use strict; use warnings; use utf8; use locale; use POSIX qw(locale_h); print setlocale(LC_COLLATE,"de_DE") or die "foo? - $!\n"; ("fähler"=~/^\w+$/) ? print "yup" : print "nope"; __END__ de_DE nope
    $ perl -l use strict; use warnings; use utf8; use locale; use POSIX qw(locale_h); print setlocale(LC_CTYPE,"de_DE") or die "foo? - $!\n"; ("fähler"=~/^\w+$/) ? print "yup" : print "nope"; __END__ de_DE yup
    --
    print map{chr}unpack(q{A3}x24,q{074117115116032097110111116104101114032080101114108032104097099107101114})