in reply to select elements in a list

Just zeroing in on something nobody else has yet commented on, you have:
my $Current_Dir = `pwd`; print STDOUT "the current directory is $Current_Dir";
First, if you're using pwd like that, you should chomp it. The directory name doesn't end in a newline (normally), but the output of pwd has an extra newline on the end. This would have broken things later had you done something like:
open my $output, ">", "$Current_Dir/foo.txt";
as the extra newline would have caused the directory to not be found.

Second, you could have used Cwd, which is a core module, and done this much faster and more reliably:

use Cwd; my $Current_Dir = getcwd; print STDOUT "the current directory is $Current_Dir\n";