in reply to Duplicates in Directories

#!/usr/bin/perl # http://perlmonks.org/?node_id=1200969 use strict; use warnings; # item 3. for each NAME.epub move the corresponding NAME.pdf to subdir +/ s/epub$/pdf/ and rename $_, "subdir/$_" for <*.epub>;