Help for this page
use Encode; # ... $buff holds a utf8 string: my $cp1250buff = encode( 'cp1250', $buff );
open( OUTPUT, ">output.txt" ) or die $!; binmode OUTPUT, ":encoding(cp1250)"; # ... or just use the 3-arg version of open: # open( OUTPUT, ">:encoding(cp1250)", "output.txt" )