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

Re: Finding directory paths for missing objs

by philipbailey (Curate)
on Mar 13, 2011 at 16:51 UTC ( [id://892962]=note: print w/replies, xml ) Need Help??


in reply to Finding directory paths for missing objs

As suggested by jethro in your previous thread (Finding missing libs in a directory), File::Find can achieve your requirements:

#!/usr/bin/perl use warnings; use strict; use File::Find; find(sub { if (-d and /[oa]-le-v7(-g)?$/) { print "No matching files in $File::Find::dir/$_\n" unless +grep { /\.(o|a|so)$/ } glob "$_/*"; } }, "testdir" );

Replies are listed 'Best First'.
Re^2: Finding directory paths for missing objs
by Anonymous Monk on Mar 13, 2011 at 18:45 UTC

    what is "test dir" for?does the script search for recursive directories?.I removed "test dir" and running into the following error invalid top directory at C:/Perl/lib/File/Find.pm line 295.

      Never mind,I figured out.Thanks for your help.

Re^2: Finding directory paths for missing objs
by Anonymous Monk on Mar 13, 2011 at 18:42 UTC

    what is "test dir" for?does the script search for recursive directories?

      "testdir" is the directory where I created test directories and files. You should replace with the root of the directory tree you wish to search. Yes, File::Find does perform a recursive search.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2024-04-24 22:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found