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

Untitled

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