home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / lang / perl / 7569 < prev    next >
Encoding:
Text File  |  1992-12-21  |  1.4 KB  |  32 lines

  1. Newsgroups: comp.lang.perl
  2. Path: sparky!uunet!caen!uvaarpa!mmdf
  3. From: Rick Emerson <rick@ssg.com>
  4. Subject: WANTED: how to sort a directory
  5. Message-ID: <1992Dec21.160133.6260@uvaarpa.Virginia.EDU>
  6. Sender: mmdf@uvaarpa.Virginia.EDU (Mail System)
  7. Reply-To: rick@ssg.com
  8. Organization: The Internet
  9. Date: Mon, 21 Dec 1992 16:01:33 GMT
  10. Lines: 20
  11.  
  12. I have a directory filled with files (current count is over 2,000 files)
  13. that have an eight digit (sequence) number as their name.  As new files are
  14. added to the directory, old files may be removed from the directory.  Note,
  15. however, not all old files are removed (files over 90 days old, for example,
  16. are not automatically killed off).  I'm concerned that new (higher numbered)
  17. files not appear in the directory interleaved with older, lower numbered
  18. files.
  19.  
  20. Is there a simple, perl way to actually sort the files in ascending order?
  21. For several reasons I want to avoid sorting a list of file names; the actual
  22. directory must be guaranteed to have the file names in ascending order.
  23.  
  24. Rick
  25.  
  26.  
  27. | Richard B. Emerson     | Replies may be sent to:                         |
  28. | System Support Group   |                        rick@ssg.com             |
  29. | 940 Delaware Avenue    |-------------------------------------------------+
  30. | Lansdale, PA 19446 USA | "When you ski, you dance with the mountain --   |
  31. | Voice: 215.855.1607    |  and the mountain always leads."                |
  32.