in reply to creating empty utf8 file

open my $fh, '>', 'filename' or die $!; print $fh "\xef\xbb\xbf"; close $fh;
Boris