If you don't check the result of unlink (i.e. whether it works or not), you can equally well omit the test for existence. Hence, I would write it either as
or asunlink(@taxonomy_file_list);
(unlink($_)==1 || report_unlink_error($_,$!)) for @taxonomy_file_list;
In reply to Re: Correct code for deleting old file?
by rovf
in thread Correct code for deleting old file?
by markuswinter
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |