File-Util reviews

RSS | Module Info

File-Util (4.161200)

Point for documentation (lots of examples and cookbook). But the recipes in the cookbook currently don't really entice me to use the module. Let's see:

1) batch file rename: it's much simpler to use 'rename' or 'perlmv' utility. Or, it's much shorter to just use plain perl like 'for (grep {-f} <*>) { rename $_, s/\.log$/.txt/r }'.

2) recursively remove a directory tree: it's much shorter to just use 'File::Path::remove_tree()'.

3) increment a counter file: no locking (it's classic 1990's counter.cgi race condition all over again). Take a look at, for example, The Perl Cookbook chapter 7.11. Or I think one of Randal Schwartz's articles.

As an alternative, one can also take a look at Path::Tiny.
1 hidden unhelpful review