JupiterHost.Net wrote:


Robert wrote:

I know the directory where the files I want to delete are stored. I know the
files all look like "msqupd.log.somenumber", I have tried a few things to
pass the directory to unlink without success. The directory does have a
space in it (I am not sure if that matters).


I have had success with a more verbose "open directory, grep files, close
directory, unlink files" but I was trying to be more concise (and learn
'unlink' in the process).


perldoc -f unlink

Note: "unlink" will not delete directories unless you are superuser and the -U flag is supplied to Perl.


Though in that case there is the mighty handy, File::Path, specifically rmtree().


http://danconia.org

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to