in reply to How to erase the file content
Hi Kamesh,
Take a look at File::Slurp Module.
Thanks, Gopal.R