Guest User

Untitled

a guest
May 8th, 2012
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.34 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment