That looks like good code (++), but it has the same problem - it returns junk in the high-order bits.
I also had to change the [V] to "", in the "new" method for GetSystemDefaultLangID() . This may be due to different versions of perl, and Win32::API, and usage of strict and warnings.