Help for this page
foreach $file in @directory { if the $file is a directory { ... explicitly go to the next element; } }
use File::Basename; my $fname = basename($path);