Help for this page
use strict; use warnings; ... print "folderpath: $folder_path\n";
$folder_path =~ s{/[^/]*/\z}{};