On 2018/05/29 16:47, Edd Barrett wrote: > Hi, > > This is a little file renaming library that ships with a really quite > useful command-line tool. > > From the man page: > > ---8<--- > ...to rename all files matching *.bak to strip the extension, you might say > > rename 's/\e.bak$//' *.bak > > To translate uppercase names to lower, you'd use > > rename 'y/A-Z/a-z/' * > --->8--- > > Notes: > > * pkg/DESCR is authored by myself, since there wasn't a good overall > description on CPAN.
Those examples would seem useful in the DESCR to show how it can be used. OK either way but what do you think about this? ----- File::Rename is a Perl extension that accepts a list of files, passes them through a subroutine, and renames them according to the output of that function. rename(1) is a command-line tool using this extension, allowing batch changes like these to be made: - strip the .bak extension of any *.bak files rename 's/\e.bak$//' *.bak - translate uppercase names to lower rename 'y/A-Z/a-z/' * ----- > * It installs the tool under the rather generic name "rename". We might > consider renaming it (oh the irony) to "prename"? There's no clash in packages/base, might as well stick with the name, we can revisit later if something else turns up that uses it.