|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
|
Re: [PLUG] OT - Perl Question
|
On Fri, Jun 21, 2002 at 09:42:55AM -0600, W. Chris Shank wrote:
> I am trying to call the following windows system command (copy)
>
> sub backup {
> @args = ("copy", $_[0], $_[1]);
> system(@args) == 0
> or die "backup system @args failed: $?";
> }
>
> [...]
>
> any help with explaination is appreciated.
That's probably because there's no command "copy" in your path.
You're working too hard to solve this problem. Have you tried
using the File::Copy module?
use File::Copy;
copy("file1","file2");
That's all there is to it. File::Copy is part of the standard Perl
distribution. See http://search.cpan.org/search?mode=module&query=File::Copy
or http://www.perldoc.com if you have more questions.
Z.
______________________________________________________________________
Philadelphia Linux Users Group - http://www.phillylinux.org
Announcements-http://lists.phillylinux.org/mail/listinfo/plug-announce
General Discussion - http://lists.phillylinux.org/mail/listinfo/plug
|
|