my @files = File::Find::Rule ->file() ->name('*.rtf') ->exec(sub{ my $rtf = $_; ( my $ftp = $rtf ) =~ s/\.rtf\z/.ftp/; -e $ftp; }) ->in('.');