home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / lang / perl / 7701 < prev    next >
Encoding:
Internet Message Format  |  1993-01-07  |  1.2 KB

  1. Path: sparky!uunet!psinntp!internet!sbi!zeuswtc!cebu!goldfish
  2. From: goldfish@cebu.sbi.com (P. Goldsmith)
  3. Newsgroups: comp.lang.perl
  4. Subject: Re: Copying files; system and exec for MS-DOS perl?
  5. Message-ID: <804@cebu.sbi.com>
  6. Date: 7 Jan 93 13:52:47 GMT
  7. References: <1993Jan2.220240.16046@athena.mit.edu> <5ygswB5w165w@cybrspc.UUCP>
  8. Organization: Salomon Brothers, Inc
  9. Lines: 21
  10.  
  11. In article <5ygswB5w165w@cybrspc.UUCP> roy%cybrspc@cs.umn.edu (Roy M. Silvernail) writes:
  12. >aeichsta@athena.mit.edu (Andrew J. Eichstaedt) writes:
  13. >>...
  14. >> perl -e "system('dir')" seems to do nothing in the DOS version, whereas 
  15. >...
  16. >It appears (and I'll have to do some experimenting to verify this) that
  17. >perl is handling the system() call without a new instantiation of the
  18. >command processor.  The 'dir' command is a builtin for command.com and
  19. >...
  20.  
  21. but "xcopy" is an external command ...
  22.  
  23.     system ("xcopy $old $new") || die " ... $!";
  24.  
  25. (but then, doesn't Perl fire up a shell for any "system" which has a single
  26. argument?)
  27. -- 
  28.     Paul Goldsmith    <goldfish@sbi.com>          w    (212) 783-7733
  29.     (shredding elf)    <goldfish@ozrout.uucp>          h    (212) 727-9345
  30.     ( Shirley MacLaine told me there would be LIFETIMES like this)
  31.         so many managers ... so little time ...
  32.