perl test if directory exists

In perl to test if a directory exists use
-d "somedir"

example:

if(-d "/home/username") {
print "User directory exists\n";
}

Comments

Popular posts from this blog

Vim vi how to reload a file your editing