use Win32::API (); Win32::API->Import("user32", "BOOL LockWorkStation()"); LockWorkStation();