Hash::RenameKey - Perl extension for recursively renaming keys according to a regex pattern match
use Hash::RenameKey; my $hr = Hash::RenameKey->new; my $old = '-'; my $new = '_'; $hr->rename_key(\%hash, $old, $new);
This module provides a single function, rename_key, to recursively rename keys in a hash by applying a regex as follows:
s/$old/$new/g;
Nothing is exported. This module uses an OO interface.
Jason Clifford, <jason@ukfsn.org>
Copyright (C) 2010 by Jason Clifford
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.08 or, at your option, any later version of Perl 5 you may have available.
To install Hash::RenameKey, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Hash::RenameKey
CPAN shell
perl -MCPAN -e shell install Hash::RenameKey
For more information on module installation, please visit the detailed CPAN module installation guide.