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:
using mv command of unix in perl

 



ajitbhaskaran
Novice

Jan 20, 2008, 11:40 PM

Post #1 of 2 (554 views)
using mv command of unix in perl Can't Post

hi,

i am using the mv command in a perl program to move a file from one directory to another, but it gives an error inside the script but if i run it in the command prompt it goes through fine.



system "mv '$thread_line' ../WIP/'$thread_line' " ;
it throws the error:

mv: ram.log
: cannot access: No such file or directory


what changes do i need to make to make the code run .

thanks

ajit bhaskaran


KevinR
Veteran


Jan 20, 2008, 11:41 PM

Post #2 of 2 (553 views)
Re: [ajitbhaskaran] using mv command of unix in perl [In reply to] Can't Post

use perls rename() command or the File::Copy module.
-------------------------------------------------

 
 


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

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