The subroutine do_this is a callback function for File::Find, documented in The-wanted-function of File::Find.
The OLDNAME you are looking for is contained in the $_ variable, which holds the current filename. Note that this variable (also called $ARG — see perlvar#General-Variables) is special: it is “understood” (used implicitly) in many Perl constructs. For example, /abc/ by itself is shorthand for $_ =~ /abc/.
Hope that helps,
| Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
In reply to Re^3: Renaming Every File in a directory
by Athanasius
in thread Renaming Every File in a directory
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |