Hello, 

Can anyone tell me what the problem with this part of code. Is part of the webmin module am writing for tomcat. 


if ( $instance eq "tomcat5" ){
    if ( $log_type eq "catalina.out") {
        if ( $num_day eq "current" ) {
            $tomcat_log = "/var/log/tomcat5/catalina.out";
        }
        else {
            $tomcat_log = "/var/log/tomcat5/catalina.out-$day.gz";
        }
    }
    elsif ( $log_type eq "access_log" ) {
        if ( $num_day eq "current") {
            $tomcat_log = "/var/log/tomcat5/access-logs/tomcat_access.log-$current";
        }
        else {
            $tomcat_log = "/var/log/tomcat5/access-logs/tomcat_access.log-$inday.gz";
        }
    }
}
else {
    if ( $log_type eq "catalina.out" ) {
        if ( $num_day eq "current" ) {
            $tomcat_log = "/var/lib/$instance/logs/catalina.out";
        }
        else {
            $tomcat_log = "/var/lib/$instance/logs/catalina.out-$day.gz";
        }
    }
    elsif ($log_type eq "access_log" ) {  
        if ( $num_day eq "current") {
            $tomcat_log = "/var/lib/$instance/access-logs/tomcat_access.log-$current";
        }   
        else {
            $tomcat_log = "/var/lib/$instance/access-logs/tomcat_access.log-$inday.gz";
        }
    }
}