# LC_ALL=hu_HU (the encoding for the locale is latin2) use open qw/:locale/; use locale; $a = <>; # read in eg: 'é' in latin2, converted correctly $a =~ m/\w/; $a =~ m/[\w]/; # both match