in reply to Recursive sub efficiency

Try:

xcopy /t /e h:\* "C:\Documents and Settings\My Documents\TEST"

It usually runs significantly faster than Perl. (You might want to add /o to copy the permissions)


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
RIP an inspiration; A true Folk's Guy

Replies are listed 'Best First'.
Re^2: Recursive sub efficiency
by skywalker (Beadle) on Jun 10, 2010 at 20:06 UTC

    Man thats quick, ive just run it on a directory with 205 sub folders and its a lot faster than Perl.

    However I wanted to brush up on my Perl skills (or lack there of)
      But you asked to make it more efficient. And calling other programs is very Perlish. Larry didn't call Perl a "glue language" without having a reason. Code reuse is a good thing, and code reuse doesn't stop at Perl code. IMO, a programmer who opts for a Perl solution for the sake of having a Perl solution is still at the newbie stage. system is a very important tool in the Perl toolkit.
        I fully agree with you, ive used system calls to run other apps and it works great when needed. However, as I said this was purely for brushing up my knowledge base, and to see what kind of steps I can use to futher that knowlege.