After writing to the file, the position in the filehandle corresponds to the end of the file. There is nothing to read there. You have to seek to the beginning of the file, or to a position obtained earlier by tell.
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
Comment on Re: write and read the same file not display the output