Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^5: tree command

by choroba (Cardinal)
on Oct 14, 2015 at 09:45 UTC ( [id://1144841]=note: print w/replies, xml ) Need Help??


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

You can use
my @dirs = glob '*/';

To get the number of files, just subtract the number of dirs from the number of everything.

لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

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

    Which will iterate of the files a second time and will access the file system while I iterate over an array. Or am I wrong?


    s$$([},&%#}/&/]+}%&{})*;#$&&s&&$^X.($'^"%]=\&(|?*{%
    +.+=%;.#_}\&"^"-+%*).}%:##%}={~=~:.")&e&&s""`$''`"e
      Ouch, you're right. Doing -f wouldn't help much, either. What about
      my @all = glob '* */'; @dirs = grep m(/$), @all; # etc.
      لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2024-03-28 11:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found