Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Trouble with File::Find::Rule

by wazat (Scribe)
on Dec 12, 2013 at 21:22 UTC ( #1066923=note: print w/ replies, xml ) Need Help??


in reply to Trouble with File::Find::Rule

It looks like your second time through the loop, the contents of @files, will be overwritten.

Do you even need a loop? Would the following not work as well?

@files = File::Find::Rule->file() ->name( "*.wma", "*.wmv" ) ->in( 'C:\Test\Calls\Archive', 'C:\Test\Calls\History');


Comment on Re: Trouble with File::Find::Rule
Download Code
Re^2: Trouble with File::Find::Rule
by sowais (Sexton) on Dec 12, 2013 at 21:34 UTC

    wazat, that did work and thanks for pointing that out (an embarrassing obvious). A second set of eyes does help!

Re^2: Trouble with File::Find::Rule
by taint (Chaplain) on Dec 12, 2013 at 22:10 UTC
    In addition to wazat's advice. I wonder if File::List might be helpful too.

    --Chris

    Yes. What say about me, is true.
    

      In addition to wazat's advice. I wonder if File::List might be helpful too.

      And hammer and pancakes

        Given all the time saved dumping the @files loop, for File::List. There'll be plenty of time for whatever.
        Yes. What say about me, is true.
        

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1066923]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (7)
As of 2015-07-05 05:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls