calebcall has asked for the wisdom of the Perl Monks concerning the following question:
Right now It will only search through the first directory. Below is what I'm using right now to do this. I'm using Find::File::Rule which if I'm reading correctly, is supposed to be able to accept an array. I don't doubt that I'm doing something wrong. (I'm a complete newb at this stuff)# ./findem.pl /home/me /home/you
I've tried manually building my array (i.e. changing @ARGV to @dirs and using my @dirs = ("/home/me","/home/you"); ) and it still does not work, so I'm thinking it's something with how I'm trying to use the directories. Any suggestions?#!/usr/bin/env perl use strict; use warnings; use File::Find::Rule; my @files = find( file => name => [qw/ *.mkv *.avi / ], in => @ARGV ); foreach my $infile (@files) { print $infile . "\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Searching Multiple directories???
by GrandFather (Saint) on Oct 20, 2011 at 02:14 UTC | |
by calebcall (Sexton) on Oct 20, 2011 at 02:27 UTC | |
by anneli (Pilgrim) on Oct 20, 2011 at 05:20 UTC | |
by afresh1 (Hermit) on Oct 20, 2011 at 04:37 UTC | |
by mrstlee (Beadle) on Oct 20, 2011 at 10:16 UTC | |
by GrandFather (Saint) on Oct 20, 2011 at 10:37 UTC | |
by mrstlee (Beadle) on Oct 20, 2011 at 16:01 UTC | |
|