LANG=ru_RU LANGUAGE=ru_RU:ru LC_ALL=ru_RU.CP1251 LC_MESSAGES=ru_RU.CP1251 perl -e 'open my $f, "<", "notafile" or print $!' #### LANG=ru_RU LANGUAGE=ru_RU:ru LC_ALL=ru_RU.utf8 perl -e 'open my $f, "<", "notafile" or print $!' #### my $errno = decode("SOMEENCODING", $!)