sub logging_cfg { my $cfg = undef; local $/; if ( $ENV{SIEBEL_SRVRMGR_DEBUG} ) { if ( ( -e $ENV{SIEBEL_SRVRMGR_DEBUG} ) and ( -f $ENV{SIEBEL_SRVRMGR_DEBUG} ) ) { open( my $in, '<', $ENV{SIEBEL_SRVRMGR_DEBUG} ) or die "Cannot read $ENV{SIEBEL_SRVRMGR_DEBUG}: $!"; $cfg = <$in>; close($in); } else { die 'ENV SIEBEL_SRVRMGR_DEBUG is defined but the value does not exists in the filesystem or is not a file'; } } else { $cfg = ; } return $cfg; }