in reply to Month Names
use POSIX qw(locale_h strftime); # arturo's fix use locale; # not necessarily needed in *this* case # locale_h above and the setlocale() calls below # are only needed in normal circumstances if you # want to work outside of your machine's default # locale. for $locale (qw{ en fr de }) { setlocale(LC_TIME, $locale); for (0..11) { print "Locale $locale\n---------\n"; # strftime is now localized to $locale print strftime("%B", 0, 0, 0, 1, $_, 96); print "\n"; } }
Note: Code samples are for conceptual use only and generally are not meant to be cut/pasted into a production application. Always 'use strict', have a thorough understanding of the code you use, and check the return values of functions and handle errors according to your needs. - Fastolfe
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: Oddities
by arturo (Vicar) on Sep 28, 2000 at 02:11 UTC | |
by tilly (Archbishop) on Sep 28, 2000 at 02:49 UTC |