http://www.perlmonks.org?node_id=11152786


in reply to Re^2: How to Rename files in multiple directories with a Perl script using an array of hashes.
in thread How to Rename files in multiple directories with a Perl script using an array of hashes.

Now that I have corrected the glob path array, only the FIRST _ character is being replaced, rather than every instance in the filename.

Ah, that'll be because that's what you've asked for: to replace them all, you need to add the //g flag ("global") to the substitution:

    _code     => sub { s/_/ /g },