Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^5: tree command

by RichardK (Parson)
on Oct 14, 2015 at 09:17 UTC ( #1144834=note: print w/replies, xml ) Need Help??


in reply to Re^4: tree command
in thread tree command

Doesn't the code I posted do exactly that with only one pass? I didn't add the display file bit, but that's trivial to add if you need it.

Here's the output of my code run on my junk directory, it seems to do what you ask :)

+-dbf +-palindrome +-plot +-rules | +-abc1 | | +-ba | | +-de | | +-te

Replies are listed 'Best First'.
Re^6: tree command
by Skeeve (Parson) on Oct 14, 2015 at 15:45 UTC

    if you didn't just post a part of the output, my tree would look like this:

    . \--dbf |--palindrome |--plot \--rules \--abc1 |--ba |--de \--te

    You see? I need to know, when I'm at "dbf", "rules", "abc1" and "te", that this one is the last element in the respective directory to stop printing the superfluous "|" characters you have.


    s$$([},&%#}/&/]+}%&{})*;#$&&s&&$^X.($'^"%]=\&(|?*{%
    +.+=%;.#_}\&"^"-+%*).}%:##%}={~=~:.")&e&&s""`$''`"e

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1144834]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2020-06-04 23:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you really want to know if there is extraterrestrial life?



    Results (35 votes). Check out past polls.

    Notices?