Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Traverse a directory

by zentara (Archbishop)
on Sep 05, 2012 at 10:48 UTC ( #991806=note: print w/ replies, xml ) Need Help??


in reply to Traverse a directory

Also see Extract file type from stat() mode

#!/usr/bin/perl -w use strict; use File::Find; # my @directories = ('/dir1','/dir2'); my @directories = ('.'); # for testing this example find(\&wanted,@directories); sub wanted { my ($dev, $ino, $mode, $nlink, $uid, $gid) = lstat($_); print $File::Find::name . " $dev "."$mode "."\n"; }

I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku ................... flash japh


Comment on Re: Traverse a directory
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (12)
As of 2014-09-19 18:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (144 votes), past polls