Chat on IRC |
how do i delete a file with perl on a mac of unix system?
Posted by i_need_a_new_name [send private reply] at June 28, 2002, 04:15:19 PM
i need to make temp files but i don't know how to delete them after...
Posted by i_need_a_new_name [send private reply] at June 28, 2002, 04:18:15 PM
im 13 by the way
Posted by i_need_a_new_name [send private reply] at June 28, 2002, 04:30:46 PM
im pretty sure you can, it just doesn't say anywhere how :(
Posted by i_need_a_new_name [send private reply] at June 28, 2002, 04:32:15 PM
sorry, OR unix system :P
Posted by gian [send private reply] at June 28, 2002, 04:45:58 PM
On unix I believe you could either do some sort of system call (maybe "system") and just use that to do "rm -f <filename". Otherwise, I believe you might be looking for an unlink function (unlinking is effectively the act of deletion on a Unix system).
Posted by i_need_a_new_name [send private reply] at June 28, 2002, 04:54:36 PM
ok, thanks, im pretty sure using system exits the program your runing, but I'll try unlinking
Posted by gian [send private reply] at June 28, 2002, 05:01:42 PM
Theoretically it shouldn't. It should halt the execution until the system call has finished, but then it should continue...
Posted by i_need_a_new_name [send private reply] at June 28, 2002, 05:09:42 PM
well thats what i thought, but i was reading th FAQ and it seems to say it stops the program... anyway, unlinking works, thanks :)
Register as a new user | ||||||||||