Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Re: how to get total numbers of files in a directory?

by flounder99 (Friar)
on Dec 09, 2003 at 15:53 UTC ( [id://313430]=note: print w/replies, xml ) Need Help??


in reply to Re: how to get total numbers of files in a directory?
in thread how to get total numbers of files in a directory?

Watch out for dirctories ending in .txt
$ touch temp.txt $ mkdir dir.txt $ perl -le 'print scalar @{[<./*.txt>]}' 2
Try this:
$ perl -le 'print scalar @{[grep {-f} <./*.txt>]}' 1

--

flounder

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (7)
As of 2024-04-18 20:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found