CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
system function for cp

 



fracken_toaster
New User

May 18, 2009, 2:34 PM

Post #1 of 2 (341 views)
system function for cp Can't Post

I'm trying to copy a file to the old directory while retaining the file in the current directory. The code that I'm using is as follows:

system("cp", "$_[0]","old/$_[0].arc");

However, this does the same as using the mv command. The file gets moved to the old directory. The file does not also remain in the current directory.

Any suggestions?


fracken_toaster
New User

May 18, 2009, 3:42 PM

Post #2 of 2 (337 views)
Re: [script123] system function for cp [In reply to] Can't Post

The problem here was that the command

unlink("$_[0]");

was issued in another area.

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives