# Kod wywietla wynik dziaania programu handle.exe

use Win32::OLE;
$Win32::OLE::Warn = 3;

# ------ KONFIGURACJA SKRYPTU ------
$strFilePattern = '<NazwaPliku>';
# np. personal.pst
$strHandleExec = 'handle.exe';
# Jeli programu handle.exe nie ma w zmiennej PATH,
# trzeba bdzie poda jego pen ciek.
# ------ KONIEC KONFIGURACJI ---------
$objWshShell = Win32::OLE->new('WScript.Shell');
$objExec = $objWshShell->Exec($strHandleExec . ' ' . $strFilePattern);
while (!$objExec->StdOut->AtEndOfStream) {
    print $objExec->StdOut->ReadLine(), "\n";
}
