$thebase .= (substr($thebase, -1) eq '/') ? 'default' : '/default'; #### if(substr($thebase, -1) eq '/') { $thebase = $thebase . 'default'; } else { $thebase = $thebase . '/default'; }