use Win32::Process; my $curentProcess; my $pid = Win32::Process::GetCurrentProcessID(); if (Win32::Process::Open($curentProcess, $pid, 0)) { $p->SetPriorityClass(HIGH_PRIORITY_CLASS)) }