if (-e "./log.conf") { Log::Log4perl->init("./log.conf"); } elsif (-e "../log.conf") { Log::Log4perl->init("../log.conf"); } else { Log::Log4perl->init("/etc/log.conf"); }