in reply to Re^2: Searching Sub Dir for Files
in thread Searching Sub Dir for Files

Is installing it locally (like in /home/yourname/local) an option?
1) is not an option--if it's running on the server, it can't read your modules from your pc.
2) you can, but it will take time, and not be as robust as the hardened and proven File::Find module.

You can always look at File::Find's source, but i would strongly recommend using the module itself (are you sure it's not installed already?). If you're going to write it yourself, i'm sure you can find a recursion example of doing just this...

A workaround would be to use unix tools .. construct a commandline w/somthing like (i'm sure you'll want to tweak the egrep settings):
my $cmd = 'find /some/path -name \*.sas | egrep -l ' . "'(" . join(' +|',@words) . ")'";

Replies are listed 'Best First'.
Re^4: Searching Sub Dir for Files
by Fuism (Beadle) on Jun 01, 2005 at 19:28 UTC
    Well our Unix box has the bare minimum when it comes to perl... no modules installed. I cant install it on the unix box. As for #1, lets say if I install it on my PC using ppm, and use the Telnet Module to telnet over and use File:Find to search directories, would that work? Pao
      no, it can't work -- if File::Find is on your pc, it can only be executed on your pc and so will only find your files, not the servers...

      "no modules installed" ... are you _sure_?? you really have just /usr/local/bin/perl and _nothing_ else? doing locate perl and locate .pm brings up _nothing_? (is this a system where everything has to be tiny? why isn't here a normal perl install?)

      just for kicks, try doing perl -MFile::Find -e 1 on the command line and see if you get an error or not.