Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Help using find for Perl...

Help using find for Perl...

From: Denmark Weatherburne <denmark_weatherburne_at_hotmail.com>
Date: Wed, 29 Aug 2001 18:17:11 -0700
Message-ID: <F001.0037C61C.20010829183530@fatcity.com>

Hi Gurus,

I am trying to use Perl to find files with a particular extension (*.bat) on remote machines on our network.
I'm running Windows NT 4.0. I'm using ActivePerl v5.6.1 Build 626 May 2,2001.
This is the script I got after running find2perl with the unix find specification and redirecting the output to a file:

#! D:\Perl\bin\perl.exe -w

    eval 'exec D:\Perl\bin\perl.exe -S $0 ${1+"$@"}'

        if 0; #$running_under_some_shell

use strict;
use File::Find ();

# Set the variable $File::Find::dont_use_nlink if you're using AFS,
# since AFS cheats.

# for the convenience of &wanted calls, including -eval statements:
use vars qw/*name *dir *prune/;

*name   = *File::Find::name;
*dir    = *File::Find::dir;
*prune  = *File::Find::prune;


# Traverse desired filesystems

File::Find::find({wanted => \&wanted}, '\\\\testdbmonitor/c$'); exit;

sub wanted {

    /^.*\.bat\z/s;
}

When I executed it, no output resulted and after about 30 seconds the command prompt was returned. Definately the remote machine I was searching has lots of .bat files.

Please help!

Thanks in advance,

Denmark Weatherburne
"Knowledge is power, but it is only useful if it is shared!"



Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Denmark Weatherburne
  INET: denmark_weatherburne_at_hotmail.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Wed Aug 29 2001 - 20:17:11 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US