Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Trouble with File::Find::Rule

by wazat (Monk)
on Dec 12, 2013 at 21:22 UTC ( [id://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');

Replies are listed 'Best First'.
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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1066923]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (2)
As of 2024-04-20 03:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found