Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 8th, 2012  |  syntax: Perl  |  size: 0.34 KB  |  hits: 38  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. my $key = $Registry->{"Classes"};
  2. recurseRegistry("Classes");
  3.  
  4.  
  5. sub recurseRegistry($){
  6.         $start = shift;
  7.         my $key = $Registry->{$start};
  8.         for (keys %$key) {
  9.                 if (#We've reached a leaf) {
  10.                         #Check if value matches what we're searching for, return path
  11.                 }
  12.                 elsif (#We are not at a leaf) {
  13.                         recurseRegistry("$start/$_");
  14.                 }
  15.         }
  16. }