F:\dev\File_Tree>perl tree.pl F:\dev\File_Tree F:\dev\File_Tree | tmon.out | tree2.pl | tree.pl | tree2 | echo | dumptree.pl | tree.pl.bak +---b | file | | +---c | | file | | | | +---d | | | file +---a | aabcccfile | file | bbcccfile | | +---234 | | +---b | | bcccfile | | FILE | | | | +---a | | | FILE | | | | | | +---AAAAAADIRRRRRR | | | | | | +---DIRRRRRR | | | | file | | | | | | +---b | | | | FILE | | | | | | | | +---c | | | | | FILE | | | | | | | | | | +---d | | | | | | FILE | | | | | | | | | | | | +---f | | | | | | | FILE | | | | +---b | | | file | | | | | | +---c | | | | file | | | | | | | | +---d | | | | | file | | | | +---c | | | cfile | | | ccfile | | | cccfile | | | | | | +---d | | | | dfile | | | | | | | | +---e | | | | | efile +---echo0 +---File | fily.txt | | +---Tree | | Tree.pm | | Makefile.PL | | README | | test.pl | | Changes | | MANIFEST ### I INVITE YOU TO MAKE THE OUTPUT LOOK MORE LIKE ### AND AN EXTRA ++ IF YOU DO IT WITHOUT BUILDING THE ARRAY :) F:\dev\File_Tree>tree /a /f . F:\DEV\FILE_TREE | echo | dumptree.pl | tmon.out | tree2.pl | tree.pl | tree2 | tree.pl.bak | +---File | | fily.txt | | | \---Tree | Tree.pm | Makefile.PL | README | test.pl | Changes | MANIFEST | +---echo0 +---a | | bbcccfile | | aabcccfile | | file | | | +---b | | | bcccfile | | | FILE | | | | | +---c | | | | cfile | | | | ccfile | | | | cccfile | | | | | | | \---d | | | | dfile | | | | | | | \---e | | | efile | | | | | +---b | | | | file | | | | | | | \---c | | | | file | | | | | | | \---d | | | file | | | | | \---a | | | FILE | | | | | +---b | | | | FILE | | | | | | | \---c | | | | FILE | | | | | | | \---d | | | | FILE | | | | | | | \---f | | | FILE | | | | | +---DIRRRRRR | | | file | | | | | \---AAAAAADIRRRRRR | \---234 \---b | file | \---c | file | \---d file F:\dev\File_Tree>