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