in reply to Re^5: how to move the folder from one directory to another directory?
in thread how to move the folder from one directory to another directory?

This code will also fill up the stack as re_scan calls itself endlessly (Perl should even have warned you about "Deep recursion"). I'd really recommend you read up on recursion (e.g. Modern Perl: Recursion) and how to turn it into iteration, for example here: http://www.refactoring.com/catalog/replaceRecursionWithIteration.html

Replies are listed 'Best First'.
Re^7: how to move the folder from one directory to another directory?
by james28909 (Deacon) on Dec 28, 2014 at 23:14 UTC
    I think i understand what your saying. I could put all this into an endless loop and not call sub functions (recurse) over and over. Is that what you mean?

      In this case yes, exactly.

      The case in the other thread is a little bit different, which is why I'd still recommend reading up on recursion.

        Yeah, after i sat down and looked at my code in the other thread real good, i come to the conclusion that it needs completely rewritten. I will see what i can come up with and maybe repost it in a few days/weeks. I start my new job tomorrow at drake software, so i may not be around as much as id like.