in reply to when i run a log file,will get some output in numbers say'12345' ,i would like to copy it in excel file?

Please edit your post to use <code> tags to enclose the Perl source code.

Now, when it actually comes down to “getting it into a spreadsheet,” you basically have two choices.   One strategy is to build an .XSLX file.   Excel::Writer::XSLX purports to do that.   (Spreadsheet::WriteExcel and Spreadsheet::WriteExcelXML are others.)   However, personally, I don’t do it that way.   Instead, I use OLE.

Querylet::Output::Excel::OLE is a good example (see the Source hyperlink on the page ...) of how this sort of thing can be done.   (Win32::OLE and Win32::OLE::Const do the actual heavy-lifting.)   I open an Excel.Spreadsheet OLE-object and tell it (Excel, itself) what I want to do.   Excel is the one that does the actual work.