in reply to Character encoding in emails

you could put some debug information like Re: Perl script works differently from Apache then CMD line into the mail, perhaps also show @INC, to spot differences there.