[EMAIL PROTECTED] wrote:

> Does anyone have a descent way to convert a file hierarchy into a hierarchy of hash 
>references? I'd like to get the following:
> These folders:
> 
> C:\winnt
> C:\winnt\system32
> C:\winnt\system
> C:\winnt\system32\logfiles
> 
> become this:
> 
> %root= {};
> $root= \%root;
> 
> $root->{C} = $object;
> $root->{C}->{winnt} = $object;
> $root->{C}->{winnt}->{system} = $object;
> $root->{C}->{winnt}->{system32} = $object;
> $root->{C}->{winnt}->{system32}->{logfiles} = $object;
> 
> Does that make sense? Or does someone have a different way?


Depends, what does $object contain ?


How will you treat files and links vs dirs in the hash ?


-- 
   ,-/-  __      _  _         $Bill Luebkert   ICQ=14439852
  (_/   /  )    // //       DBE Collectibles   Mailto:[EMAIL PROTECTED]
   / ) /--<  o // //      http://dbecoll.tripod.com/ (Free site for Perl)
-/-' /___/_<_</_</_     Castle of Medieval Myth & Magic http://www.todbe.com/

_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to