Hi Kamesh,
Take a look at File::Slurp Module.
Thanks, Gopal.R
In reply to Re: How to erase the file content by gopalr in thread How to erase the file content by kamesh3183