Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
But get this error:#!/usr/bin/perl + open (GG,"getall.txt"); $dest="/home/test/files/"; $targ="/home/new/newfiles/"; while ($_=<GG>) { ($first,$second,$third)=split(/\./,$_); print "first: $first second: $second third: $third \n"; system (`cp $dest $_ $targ`); } close(GG);
the 'getall.txt' file looks like this:cp: /home/test/files/: is a directory. Need "-R" option. sh: /home/new/newfiles/: Execute permission denied.
I am just trying to copy - not execute. I can do it from a command line. But must have screwed something up.get.3.020922120002 get.3.020923120002 get.3.020924120001 get.3.020925120001 get.3.020926120002 get.4.020921153001 get.4.020922153001 get.4.020923153002 get.4.020924153001 get.4.020925153002 get.5.020922083002 get.5.020923083002 get.5.020924083002 get.5.020925083003 get.5.020926083002
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Copying files
by RMGir (Prior) on Sep 26, 2002 at 19:31 UTC | |
|
Re: Copying files
by Enlil (Parson) on Sep 26, 2002 at 19:27 UTC | |
by Enlil (Parson) on Sep 26, 2002 at 19:31 UTC | |
by mark_clements (Initiate) on Sep 27, 2002 at 12:08 UTC |