File::PerlMove - Rename files using Perl expressions
use File::PerlMove; File::PerlMove::move(sub { $_ = lc }, \@filelist, { verbose => 1 });
File::PerlMove provides a single subroutine: File::PerlMove::move.
move takes three arguments: transform, filelist, and options.
transform must be a string or a code reference. If it is not a string, it is assumed to be a valid Perl expression that will be turned into a anonymous subroutine that evals the expression. If the expression is any of uc, lc, of ucfirst, the resultant code will behave as if these operations would modify $_ in-place. Note, however, that using any of these operations is useless on file systems that are case insensitive, like MS Windows and Mac.
uc
lc
ucfirst
$_
When transform is invoked it should transform a file name in $_ into a new file name.
filelist must be an array reference containing the list of file names to be processed.
options is a hash reference containing options to the operation.
Options are enabled when set to a non-zero (or otherwise 'true') value. Possible options are:
Show the changes, but do not rename the files.
Link instead of rename.
Symlink instead of rename. Note that not all platforms support symlinking,
Process the files in reversed order.
Overwrite existing files.
Create target directories if necessary.
More verbose information.
None.
See pmv for examples.
Johan Vromans <jvromans@squirrel.nl>
App::perlmv (and perlmv), File::Rename (and rename).
This programs is Copyright 2004,2010,2017 Squirrel Consultancy.
This program is free software; you can redistribute it and/or modify it under the terms of the Perl Artistic License or the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
To install File::PerlMove, copy and paste the appropriate command in to your terminal.
cpanm
cpanm File::PerlMove
CPAN shell
perl -MCPAN -e shell install File::PerlMove
For more information on module installation, please visit the detailed CPAN module installation guide.