Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^2: archive::zip how to delete files after creating the zip.

by rjt (Curate)
on Jun 30, 2013 at 09:11 UTC ( [id://1041561]=note: print w/replies, xml ) Need Help??


in reply to Re: archive::zip how to delete files after creating the zip.
in thread archive::zip how to delete files after creating the zip.

Are you looking for unlink?

I doubt the OP was looking for unlink, as they specifically asked how to delete files and directories, and unlink only deletes regular files1.

____________

1 unlink can delete directories under certain somewhat unusual conditions, but such use is not recommended. From unlink:

Note: unlink will not attempt to delete directories unless you are superuser and the -U flag is supplied to Perl. Even if these conditions are met, be warned that unlinking a directory can inflict damage on your filesystem. Finally, using unlink on directories is not supported on many operating systems. Use rmdir instead.

rmdir only deletes empty directories, and its documentation specifically suggests File::Path, as I've already suggested.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2024-04-24 11:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found