in reply to create an excel file

If you are working in a Windows-environment, you will probably be happy with Win32::OLE. There are many resources online on how to use it with Excel. One of the best is this great node by cacharbe: Using Win32::OLE and Excel - Tips and Tricks.

HTH, Rata