this challenge
my $th = threads->create(\&print, "Hello thread World!\n");
$th->join();
works great. But as soon as I add
binmode(STDOUT, ":encoding(ISO-8859-1)");
in my script file, I get the error "segmentation fault", "access denied".
What is wrong to determine the type of encoding when trying to call a perl stream?
Example:
use strict; use warnings;
use threads;
binmode(STDOUT, ":encoding(ISO-8859-1)");
my $th = threads->create(\&print, "Hello thread World!\n");
$th->join();
sub print {
print @_;
}
This code does not work for me.
Yours faithfully
- Andy
source
share