i've now changed the code and it works fine.
Code:
if (! -d "$logdir") {
use File::Path;
eval { mkpath($logdir) };
if ($@) {
print "\nERROR: release log directory creation failed - $logdir: $!\n";
exit;
}
i've just started learrning
perl and i'm slowly discovering that it makes things harder and longer. in unix i would have done this in one line.
Code:
[ -d ${LOGDIR} ] || mkdir -p ${LOGDIR} || { echo "\nERROR: release log directory creation failed - ${LOGDIR}"; exit 1; }
thank you cbkihong.