use Win32::OLE; my $wmi = Win32::OLE->GetObject("winmgmts:"); my $obj = $wmi->GetObject("Win32_Printer"); my $rv = $obj->PrintTestPage();