I'm going through someone's old code and I came across this statement:
$tmpStr = "/some/file/location/";
if(-d $tmpStr){
printf("1");
}else{
printf("2");
}
I'm confused about what the -d
does... any help?
-d
returns true if the following string is a directory.
See -X
in perlfunc.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With