Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Testing for readdir failure

by Khen1950fx (Canon)
on Apr 21, 2013 at 04:27 UTC ( #1029704=note: print w/ replies, xml ) Need Help??


in reply to Testing for readdir failure

Try IO::Dirent. It seems more robust.

#!/usr/bin/perl -l use strict; use warnings; use IO::Dirent; my (@dirs) = '/'; foreach my $dir (@dirs) { opendir DIR, $dir; while ( my $entry = nextdirent(DIR) ) { print $entry->{'name'}; print $entry->{'type'}; print $entry->{'inode'}; } closedir DIR; }


Comment on Re: Testing for readdir failure
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (10)
As of 2014-12-21 17:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (106 votes), past polls