#! perl -slw use strict; use Win32::API::Prototype;; { local $^W = 0; ## Ignore warning from Win32::API::Prototype ApiLink( 'kernel32', 'HANDLE GetCurrentProcess( )' ) or die $^E; ApiLink( 'kernel32', 'HRESULT SetPriorityClass( HANDLE p, DWORD c )' ) or die $^E; } SetPriorityClass( GetCurrentProcess(), -1 ); print "Check priority for process $$ in the Task Manager"; ## You should see that it has been set to 'LOW' ;