$PathOnly = "c:\Dir1\Dir2\Dir3"; @SubDirs = split('\', $PathOnly);