It was Wednesday, November 19, 2003 when Ramprasad A Padmanabhan took the soap box, saying: : I have a program that writes into a LDAP server using Net::LDAP that did : not work. : : After wasting 2 days I ultimately found out that th LANG environment : variable on my box ( Redhat 9.0 ) was creating the problem. : : If I do a : : unset LANG ; /path/myscript.pl , then the program works fine : : But if in my program I say : : $ENV{LANG} = undef; : This does not seem to work : : So How do I ensure that my program will run without the LANG variable : set to some stupid value
Setting your environment has to happen as early as possible, in a BEGIN block, so it's the first thing Perl does after compiling the source code. BEGIN { undef $ENV{LANG}; } Casey West -- Shooting yourself in the foot with FidoNet You put your foot in your mouth, then echo it internationally. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]