Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Building a nested data structure from File::Find

by wind (Priest)
on Jun 09, 2011 at 23:27 UTC ( [id://909022]=note: print w/replies, xml ) Need Help??


in reply to Building a nested data structure from File::Find

Use an embedded sub in situations like this. Will make it easier read your code and to build your local data structure.
sub Load { my $dir = shift; my %tree; find(sub { push @{$tree{ $File::Find::dir }}, $_; }, $dir); ... }

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://909022]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2024-04-24 18:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found