=item setlocale
-Modifies and queries program's locale.
+Modifies and queries program's locale. The following examples assume
+
+ use POSIX qw(setlocale LC_ALL LC_CTYPE);
+
+has been issued.
The following will set the traditional UNIX system locale behavior
(the second argument C<"C">).
- $loc = POSIX::setlocale( &POSIX::LC_ALL, "C" );
+ $loc = setlocale( LC_ALL, "C" );
-The following will query (the missing second argument) the current
-LC_CTYPE category.
+The following will query the current LC_CTYPE category. (No second
+argument means 'query'.)
- $loc = POSIX::setlocale( &POSIX::LC_CTYPE);
+ $loc = setlocale( LC_CTYPE );
The following will set the LC_CTYPE behaviour according to the locale
environment variables (the second argument C<"">).
Please see your systems L<setlocale(3)> documentation for the locale
environment variables' meaning or consult L<perllocale>.
- $loc = POSIX::setlocale( &POSIX::LC_CTYPE, "");
+ $loc = setlocale( LC_CTYPE, "" );
The following will set the LC_COLLATE behaviour to Argentinian
Spanish. B<NOTE>: The naming and availability of locales depends on
your operating system. Please consult L<perllocale> for how to find
out which locales are available in your system.
- $loc = POSIX::setlocale( &POSIX::LC_ALL, "es_AR.ISO8859-1" );
+ $loc = setlocale( LC_ALL, "es_AR.ISO8859-1" );
=item setpgid