in reply to Correct code for deleting old file?
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;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Correct code for deleting old file?
by thirdm (Sexton) on Jun 15, 2012 at 20:04 UTC | |
|
Re^2: Correct code for deleting old file?
by cavac (Prior) on Jun 17, 2012 at 21:35 UTC | |
by rovf (Priest) on Jun 18, 2012 at 08:16 UTC | |
by cavac (Prior) on Jun 18, 2012 at 17:29 UTC |