$excel = Win32::OLE->new('Excel.Application', 'Quit') or ($excel_res = 0, $ew_message = "Could not create excel bject"); print "[open_spreadsheet] after excel result <$excel_res> mess <$ew_message>\n"; if($excel_res == 1) { $workbook = $excel->Workbooks->Open($hist_file) or ($workbook_res = 0, $ew_message = "Could not open excel workbook for <$hist_file>"); print "[open_spreadsheet] after workbook result <$workbook_res> mess <$ew_message> for <$hist_file>\n"; }