my $file = shift; my $enc = "UTF-16"; open(FILE, "<:encoding($enc)", $file) || die("Can't: $!"); while ( ) { print; } close(FILE); #### my $file = shift; my $enc = "UTF-16"; open(FILE,$file) || die("Can't: $!"); while ( ) { my $str = decode($enc,$_); print encode($enc,$str); } close(FILE);