open my $fh,'<', $input_file or die "can't open file:$!"; binmode $fh,":encoding(UTF-8)"; ...