Home: Perl Programming Help: Beginner:
check if directory exist and executable



digioleg54
User

Sep 30, 2016, 9:35 AM


Views: 2573
check if directory exist and executable

I can check if ( -d $dir)--it is directory exists.
But how can I check if directory executable?


FishMonger
Veteran / Moderator

Sep 30, 2016, 4:17 PM


Views: 2563
Re: [digioleg54] check if directory exist and executable


Code
if ( -x $dir)

http://perldoc.perl.org/functions/-X.html