Hi anders, On Wed, 15 Jun 2011 07:38:46 +0800 "anders lee" <jianghuma...@gmail.com> wrote:
> > when i use binmode in threaded program, i got a segmentation fault; > > i comment the binmode line, the program works well > > > use threads; > use threads::shared; > > use utf8; > binmode(STDOUT, ':encoding(utf8)'; > Well, it's not a good idea to use threads in Perl: <perlbot> rindolf: Before you start implementing code using Perl's threads, please remember that Perl's threads are not like other threads. Please see http://perldoc.perl.org/perlthrtut.html to learn more; specifically the "What kind of threads are perl threads?" section. Also see: http://www.perlmonks.org/index.pl?node_id=288022 Please consider using forking or an asynchronous I/O framework for Perl such as POE, IO::Async or Reflex, instead. Regards, Shlomi Fish -- --------------------------------------------------------------------- Shlomi Fish http://www.shlomifish.org/ Chuck Norris can make the statement "This statement is false" a true one. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/