As noted M$ OS software uses very sub optimal databases ie they store the same info in several places and the utilities provided to update this info often perform badly ie don't do all the updates required leaving you with a corrupt OS.
Locale info can come from either Win.ini or the locale database and you can set the locale DB for no over-ride (sounds like your problem). Read the win32::ole::nls docs, think about what you did to break it and try to undo that.
You can often salvage the system and retain your tweaks by copying user.dat and system.dat (the 2 files associated with the registry (why 2 files - well might you ask!)) and your desktops (in Desktop or Documents and settings\%user%\Desktop depending on OS), reinstalling the OS and then replacing the files.
If what you were originally trying to do was get Perl to give you particular format for dates use POSIX::strftime or (s)prinf() and the return from localtime() or gmtime() ie:
# This gives you the web standard date format
# Sat, 08 Feb 2003 15:13:54 GMT
use POSIX;
my $date = POSIX::strftime("%a, %d %b %Y %H:%M:%S GMT", gmtime(time())
+ );
print $date, "\n";
# this will give you dd/mm/yyyy hh:mm:ss for GMT
# note $mday is actual day, $mon 0 = jan, 1=feb, 11=dec
# year is currently 103 ie you need to add 1900 for yyyy
# or subtract 100 and pack with a left zero for yy
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = gmtime(time
+);
printf "%02d/%02d/%04d %02d:%02d:%02d\n", $mday, $mon+1, $year+1900, $
+hour, $min, $sec;
# or for localtime
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(t
+ime);
printf "%02d/%02d/%04d %02d:%02d:%02d\n", $mday, $mon+1, $year+1900, $
+hour, $min, $sec;
# this will give you dd/mm/yy for GMT
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = gmtime(time
+);
printf "%02d/%02d/%02d\n", $mday, $mon+1, $year-100;
# etc
# perl will preformat datestrings if you call localtime() or gmtime()
+in
# scalar as opposed to arrray context. you can see this here
# time() is the default value as you can also see
my @bits = localtime;
my $str = localtime;
print "
array context: @bits
scalar context: $str";
__DATA__
Sat, 08 Feb 2003 15:28:14 GMT
08/02/2003 15:28:14
08/02/2003 15:28:14
08/02/03
array context: 14 28 15 8 1 103 6 38 0
scalar context: Sat Feb 8 15:28:14 2003
cheers
tachyon
s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print
|