Tuesday, 7 August 2012

Perl check if directory exists


A quik and small tip in Perl which may sound funny, but it saved my life :D
if ( -d "/folder/path/" ) {
         print "Success! Directory exists!\n";
} else {
         print "Sad news... It is gone!\n";
}


Reference :
[1] Source Pastebin.com

No comments:

Post a Comment