my $pobj = $excel_obj->ActivePrinter; if ($pobj) { print("Name of default printer =>>$pobj<<\n"); }