[tpm] Glob problem

Uri Guttman uri at StemSystems.com
Mon Oct 26 17:59:52 PDT 2009

>>>>> "a" == arocker  <arocker at vex.net> writes:

  a> Thanks everyone for the input on this, especially Liam. File::Find did the
  a> trick.

  a> (As the application uses only a single-level directory, recursion, &c.
  a> wasn't an issue.)

if so, then why the need for file::find? you can read a single dir and
grep for the files you want with opendir and readdir. or use
File::Slurp's read_dir for a simpler api. file::find is when you want
deeper searching as it is overkill for a single level. it needs a
callback sub, you have to collect entries into a global, etc. a simple
read_dir/grep is one line.


Uri Guttman  ------  uri at stemsystems.com  --------  http://www.sysarch.com --
-----  Perl Code Review , Architecture, Development, Training, Support ------
---------  Gourmet Hot Cocoa Mix  ----  http://bestfriendscocoa.com ---------

More information about the toronto-pm mailing list