home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!ames!apple!constellation!convex!tchrist
- From: tchrist@convex.COM (Tom Christiansen)
- Newsgroups: comp.lang.perl
- Subject: Re: # of files in directory
- Message-ID: <1992Jul25.020342.2579@news.eng.convex.com>
- Date: 25 Jul 92 02:03:42 GMT
- References: <1992Jul23.211249.21744@magnus.acs.ohio-state.edu> <1992Jul23.225715.21531@news.eng.convex.com> <SBO.92Jul24095759@froh.vlsi.polymtl.ca>
- Sender: usenet@news.eng.convex.com (news access account)
- Reply-To: tchrist@convex.COM (Tom Christiansen)
- Organization: CONVEX Realtime Development, Colorado Springs, CO
- Lines: 27
- Originator: tchrist@pixel.convex.com
- Nntp-Posting-Host: pixel.convex.com
- X-Disclaimer: This message was written by a user at CONVEX Computer
- Corp. The opinions expressed are those of the user and
- not necessarily those of CONVEX.
-
- From the keyboard of sbo@vlsi.polymtl.ca (Stephane Boucher):
- :>>>>> On Thu, 23 Jul 1992 22:57:15 GMT, Tom Christiansen <tchrist@convex.COM> said:
- :
- : > print "There are ",
- : > scalar(opendir(F,"/usr/bin"),scalar(grep(!/^\./,readdir(F)))),
- : > " files!\n"
- :
- :Tom? How did you manage to miss this one? And I tought you
- :where one of the great :-)
- :
- :with:
- : grep(!/^\./,readdir(F))
- :
- :you will miss all the files that start with a dot. It should
- :read:
- :
- : grep(!/^\.{1,2}$/,readdir(F))
-
- I thought about that, but was emulating ls as the original poster
- also appeared to be doing.
-
- --tom
- --
- Tom Christiansen tchrist@convex.com convex!tchrist
-
-
- "That must be wonderful! I don't understand it at all."
-