Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Re: Re: Re: Reading entire subfolder tree into an array

by weini (Friar)
on May 29, 2002 at 06:03 UTC ( [id://169987]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Re: Reading entire subfolder tree into an array
in thread Reading entire subfolder tree into an array

Hi Simon, you just have to use the module variable $File::Find::name instead of $_. It's as easy as that. So your code will look like

use File::Find; finddepth (\&RetrieveAll, "c:\\fpx"); sub RetrieveAll { push (@list,$File::Find::name,"\n"); }

HTH

weini

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (4)
As of 2025-03-15 20:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    When you first encountered Perl, which feature amazed you the most?










    Results (53 votes). Check out past polls.