http://qs321.pair.com?node_id=35235

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question: (strings)

I am using:
open FILES, "dir /b /aa /s |" or die; while(<FILES>) { #process result } close FILES;
On NT this gives me a list like:
C:\WINDOWS\INF\wordpad.inf C:\WINDOWS\INF\wordpad.PNF C:\WINDOWS\INF\WPIE3x86.INF C:\WINDOWS\INF\WPIE3x86.PNF . . .
How do I split this string into two parts, the directory path and the filename?

Originally posted as a Categorized Question.