What does this mean in perl ?
my $dirPath = "/some/dir"
if (-d $dir_path && -r _ && -w _ )
-r File is readable by effective uid/gid. -w File is writable by effective uid/gid.
-w test if the file is readable. The underscore is a special handle that is used to ask perl to return information about the file specified in the most recent file test, which is
-d $dir_path in this case.
So your code tests whether
$dirPath is a directory for which we have read & write permissions.