Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: s and replace

by ehdonhon (Curate)
on Jul 07, 2002 at 19:01 UTC ( [id://180010]=note: print w/replies, xml ) Need Help??


in reply to s and replace

finddir("$config{home}$user{site_id}"); sub finddir { my ($root, $relative) = @_; chomp ( $root ); $root .= '/' unless ( $root =~ m|/$| ); $relative .= '/' if ( defined($relative) and ( $relative !~ m|/$| ) +); local *DIR; opendir ( DIR, $root . $relative ); my @userfiles = sort grep !/^\.\.?\z/, readdir DIR; foreach $file (@userfiles) { next unless ( -d "$root$file" ); print "$relative$file"; finddir($root, $relative . $file ); } }

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (2)
As of 2024-04-26 01:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found