in reply to How to take only maximum directory name by using its digits using perl?

This question looks really familiar. Friend of yours? Classmate? That question seems to indicate that you are looking for a recursive solution, and that rev_N can appear in any sub-path, and that you would only want to retain the path that has the highest rev_N in it. Can you confirm your need? Can you describe how you would solve this if you had a pencil and paper? It's often useful to separate the code-implementation from the algorithm. Once the algorithm is understood, then committing it to code often becomes easier.

  • Comment on Re: How to take only maximum directory name by using its digits using perl?