#!/usr/bin/env perl # $Id: weird.pl,v 1.3 2017/07/13 09:06:54 karl Exp karl $ use strict; use warnings; use feature qw(say); my $file = q(weird.txt); open( my $fh, '>', $file ); binmode $fh, ':encoding(UTF-8)'; say $fh qq(nase\ngöre); close $fh; say qx (file -I $file); say qx(echo \$LANG); say qx(cat $file); open( $fh, '<', $file ); binmode $fh, ':encoding(UTF-8)'; say <$fh>; close $fh; __END__