Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

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??
--
bm

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://293552]
help
Chatterbox?
[james28909]: thanks for the vid holli, i do like it. thanks for sharing :)
[holli]: gives me goosebumps every time I watch it
holli gotta grab some groceries before dawn. l8ters
[erix]: s/dawn/dusk/
[erix]: (you're welcome :P)
[james28909]: you know, i had a thought a few mnths back. what if this universe were just a puzzle, waiting for life to figure it out!
[james28909]: what if one day we are able to grab the curtain that is "spacetime" and pull it back to reveal <insert imagination here> pulling at levers and ropes xD
[holli]: like dorothy?
[james28909]: see ya later holli
[james28909]: yeah like wizard of oz lol. its just a joke though

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (15)
As of 2017-12-15 14:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (433 votes). Check out past polls.

    Notices?