Perl in the Terminal
I'm a terminal nOOb, and just learning Perl in an Internet Programming Class I'm taking. Every time that I run a Perl script, I get the following error message:
Then the code executes just fine. I guess it's not a big deal because it still works, I just thought perhaps I could do something to fix it.
Any suggestions?
Quote:
[Andrews-Computer:~/desktop] acollins% perl code.pl
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LC_ALL = (unset),
LANG = "en"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
[Andrews-Computer:~/desktop] acollins% perl code.pl
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LC_ALL = (unset),
LANG = "en"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Then the code executes just fine. I guess it's not a big deal because it still works, I just thought perhaps I could do something to fix it.
Any suggestions?

Comments
Originally posted by acollins
I'm a terminal nOOb, and just learning Perl in an Internet Programming Class I'm taking. Every time that I run a Perl script, I get the following error message:
Then the code executes just fine. I guess it's not a big deal because it still works, I just thought perhaps I could do something to fix it.
Any suggestions?
add:
export LC=C
export LC_ALL=C
to your .tcshrc
or type that in manually every time you launch Terminal.app
Where is my .tcshrc? I made all the invisible files visible and then did a search, but got no results.
Thanks a lot for your help.
Enter the following commands in a tcsh terminal shell (the default shell for teminal.app).
cd ~
pico .tcshrc
This will put you into your home folder (~) and start the pico editor so you can CREATE your .tcshrc file. Enetr these lines
setenv LC C
setenv LC_ALL C
Now press control-x, and hit Y then enter to confirm the save. Then type exit, and completely quit the terminal app.
Now restart the terminal app and type "env". You should see a list of environment vars. Somewhere in the list you should see
LC=C
LC_ALL=C
probably at the bottom.
enjoy.