code: def find_working_perl(perls):
      for perl in perls:
          try:
              subprocess.check_output([perl, "-e", "use Win32;"])
          except subprocess.CalledProcessError:
              continue
          else:
              return perl
  
      if perls:
          print("The following perl interpreters were found:")
          for p in perls:
              print(" ", p)
          print(
              " None of these versions appear suitable for building OpenSSL"
          )
      else:
          print(
              "NO perl interpreters were found on this machine at all!"
          )
      print(
          " Please install ActivePerl and ensure it appears on your path"
      )
  
file_path: cpython/PCbuild/prepare_ssl.py
imports: from __future__ import print_function
  import os
  import re
  import sys
  import subprocess
  from shutil import copy
label_desc: Use image node_id 2 for calling a global function with example usage: find_working_perl(perls) and returns: perl