http://www.perlmonks.org?node_id=1002168


in reply to Dir Tree in Perl

For something simple, try tree. For a cmdline example:
tree /var