Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

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?

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (8)
As of 2015-11-29 15:24 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (751 votes), past polls