On Sun, Dec 2, 2012 at 12:57 AM, timothy adigun <2teezp...@gmail.com> wrote:
> > Ofcourse, one can argue that there is nothing wrong with that. But I > think is not "RIGHT" to just discard the output return by the backtick in a > void context. > In that light I concur with Charles DeRykus, that is better on uses system() > function. > So, the above can be written as thus: > > system("chcp 65001>nil"); # this works for me Using OS Win 7 32bits > >> > binmode STDOUT, ":encoding(UTF-8)"; >> > print "\x{03B1}\x{03C9}\n"; This works for me as well. Thanks, Tim and Charles! I am not sure I understand all that is going on, however. I am assuming that system("chcp 65001>nil") is redirecting the resulting informational message from executing chcp 65001 to some sort of null file that does not display at the command prompt? One thing that is bothering me from this thread is that I am beginning to feel that it is impossible to write a Perl script involving Unicode use that will seamlessly run on both Unix and Windows systems. At work I have been dabbling in Perl scripting for some months to make my life easier. It is a Solaris environment. I used to do FORTRAN and BASIC programming a few decades ago while pursuing a physics degree, so I am not particularly knowledgeable--I have basically been using Perl books to "Easter Egg" my way to developing useful scripts. But at home I have decided I might as well start doing a systematic study of Perl, both to help me at work and for fun at home. So it would be nice if I could write portable code that would work both places. Any comments? boB -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/