home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / lang / perl / 7492 < prev    next >
Encoding:
Internet Message Format  |  1992-12-17  |  1.0 KB

  1. Path: sparky!uunet!spool.mu.edu!olivea!hal.com!perv.hal.COM!not-for-mail
  2. From: aahz@hal.COM (Tom Wylie)
  3. Newsgroups: comp.lang.perl
  4. Subject: copy() primitive?
  5. Message-ID: <1gqkqtINN8ne@perv.hal.COM>
  6. Date: 17 Dec 92 19:35:57 GMT
  7. Organization: HaL Computer Systems, Inc.
  8. Lines: 15
  9. NNTP-Posting-Host: perv.hal.com
  10.  
  11. Is there some reason there isn't a primitive for copying files?
  12. (along the lines of unlink and rename).  firing off backticked /bin/cp's
  13. seems amazingly inefficient, and while yes I could use filehandles, it
  14. seems to me that a primitive that just horks in the file and spits it
  15. out somewhere else would be much faster.  I can't imagine that this
  16. hasn't come up, so I figure there must be a good reason why there isn't
  17. a copy() primitive, just wondering what it is.
  18.  
  19. Grepping the FAQ for 'cp' and 'copy' didn't turn up anything relevant,
  20. and I don't remember seeing anything about it in the Camel book.
  21.  
  22.  
  23. Thanks,
  24. Tom Wylie    | What is the difference between apathy and ignorance?
  25. aahz@hal.com    | I don't know, and I don't care.
  26.