Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re: deleting a fileby particle (Vicar) |
on Jun 04, 2001 at 23:44 UTC ( [id://85582]=note: print w/replies, xml ) | Need Help?? |
How about something that uses the output of unlink for a good purpose? no sense in letting it go to waste, after all...
also, this tells you which file was the problem, e.g. there's always a better way. is there something better here? Update 2002-06-19: yes, there's a better way. the above code assumes too much about the return value from unlink. you can't reliably determine which file(s) failed to unlink from the return code alone. i suggest the following modification, which will report accurate results:
=Particle
In Section
Seekers of Perl Wisdom
|
|