in reply to Find file name

Why not use File::Find?
use File::Find; my @database; find(\&ofas, $db_path); sub ofas { push @database, $_ if /ofas\.db$/; }

_____________________________________________________
Jeff[japhy]Pinyan: Perl, regex, and perl hacker, who'd like a job (NYC-area)
s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;

Replies are listed 'Best First'.
Re: Re: Find file name
by blueapache (Acolyte) on Nov 11, 2003 at 17:03 UTC
    Thanks. ...another newbie question How can I adjust this to deal with multiple results ?

      The above posted solution should already handle multiple results.

      ----
      I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
      -- Schemer

      : () { :|:& };:

      Note: All code is untested, unless otherwise stated