I have a mac and got problems running Perl on UPPMAX with messages about "locale"

Question

I have a Mac and have problems running perl on UPPMAX, with error messages like "Perl: warning: Setting locale failed." and "Perl: warning: Please check that your locale settings".

Answer

Edit your .bashrc file (located in your home folder) and add the following lines:

export LC_CTYPE=en_US.UTF-8 
export LC_ALL=en_US.UTF-8 

... then restart your terminal, or run, when located in your home folder:

source .bashrc