00001 use Win32::OLE; 00002 use Win32::OLE::Variant; 00003 my $session = Win32::OLE->new('MiKTeX.Session') 00004 or die "MiKTeX is not properly installed.\n"; 00005 my $path = Variant(VT_BSTR|VT_BYREF, ''); 00006 if ($session->FindPkFile($ARGV[0], $ARGV[1], $ARGV[2], $path)) { 00007 print "$path\n"; 00008 }