open FH,"<:utf8",$filename; print ; close FH; __DATA__ the above code printing the BOM along with the text inside the file. #### open FH,"<:encoding(utf8)",$filename; print ; close FH; __DATA__ this code also printing the BOM along with the text inside the file.