Hi:
Context is everything. I'm not sure how you're using a Perl script....whether you're really talking about stored processes or??? SAS/IntrNet?? SAS Integration Technologies???
First of all, if you are running on the BI platform, I'm not sure I understand why you're making a CSV file, then creating an Excel file from the CSV file??? If you were using the Platform, your task or results or data set could come directly to Excel via the SAS Add-In to Microsoft Office.
Since I see a call to APPSRV_HEADER, I suspect you're using SAS/IntrNet and a PERL script in your HTML/web front end????
Generally speaking _webout is a reserved fileref. When you use RUNMODE=S, you are supposed to be using SAS/IntrNet Application Dispatcher or a Stored Process Server. It is possible that the documentation on the use of this macro will help you:
http://support.sas.com/documentation/cdl/en/lrdict/61724/HTML/default/a002683390.htm
Otherwise, your best bet for help is to work with Tech Support, as there would be different solutions to your question depending on the context and method by which your code is executing.
cynthia