Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
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 having an uproarious good time at the Monastery: (9)
As of 2014-12-26 20:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (176 votes), past polls