perl test if directory exists
In perl to test if a directory exists use
-d "somedir"
example:
-d "somedir"
example:
if(-d "/home/username") {
print "User directory exists\n";
}
if(-d "/home/username") {
print "User directory exists\n";
}
Comments