home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.perl
- Path: sparky!uunet!think.com!enterpoop.mit.edu!senator-bedfellow.mit.edu!bloom-picayune.mit.edu!athena.mit.edu!aeichsta
- From: aeichsta@athena.mit.edu (Andrew J. Eichstaedt)
- Subject: Copying files; system and exec for MS-DOS perl?
- Message-ID: <1993Jan2.220240.16046@athena.mit.edu>
- Sender: news@athena.mit.edu (News system)
- Nntp-Posting-Host: e40-008-12.mit.edu
- Organization: Massachusetts Institute of Technology
- Date: Sat, 2 Jan 1993 22:02:40 GMT
- Lines: 17
-
- I'm using Len Reed's version of Perl for MS-DOS. I wanted my perl script
- simply to copy a file to another, new file.
-
- * I couldn't find a perl copy function to copy files, the same way rename()
- renames files, or unlink() deletes files. Am I missing something obvious?
- (I've just started using perl.)
-
- * Failing a built-in copy function, I thought I could do something like
- system("copy $oldFile $newFile"). However, I can't seem to get system or
- exec working in the version of perl I'm using. A line like
- perl -e "system('dir')" seems to do nothing in the DOS version, whereas
- perl -e "system('ls')" gives a directory (as I'd expect) when I try it on a
- Unix machine. Again, am I missing something obvious?
-
- Thanks for your suggestions.
-
- Andrew Eichstaedt
-