Perl check if directory exists

by GarciaPL on Tuesday 7 August 2012


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