Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: system( 'mv ...' ) not working?

by bm (Hermit)
on Sep 23, 2003 at 16:05 UTC ( #293552=note: print w/ replies, xml ) Need Help??

in reply to system( 'mv ...' ) not working?

Perhaps the user that runs the CGI, ie probably nobody, does not have permission to overwrite an existing /tmp/trashed. Check to see if the file already exists from the command line, and if so remove it.

Alternatively, try this:

use File::Copy; ... move($newname, '/tmp/trashed') or die "Failed to move file: $!\n";
Lastly, perhaps a better question is why can't you just unlink $newname??

Comment on Re: system( 'mv ...' ) not working?
Select or Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://293552]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (8)
As of 2016-02-10 18:09 GMT
Find Nodes?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?

    Results (354 votes), past polls