[Denver-pm] Detecting if a set of dirs exists?

Robert L. Harris robert.l.harris at gmail.com
Wed Sep 17 20:12:02 PDT 2014


Given:
  $Path = "/some/path/to/*/0[6789]/my/files/file.txt"

  do:

open(INPUT, "/bin/ls -1 $Path |");
while(<INPUT>) {
  Do stuff
}

I want to do a return or exit if $Path doesn't have any directories.  I
tried doing a :
  next if ( ! -d $Path );

but it doesn't like the 2 wildcards.

Thoughts?

Robert

-- 
:wq!
---------------------------------------------------------------------------
Robert L. Harris

DISCLAIMER:
      These are MY OPINIONS             With Dreams To Be A King,
       ALONE.  I speak for                      First One Should Be A Man
       no-one else.                                     - Manowar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/denver-pm/attachments/20140917/dc254c2f/attachment.html>


More information about the Denver-pm mailing list