1: my($thebase) = ($file =~ /(.*)\/[^\/]+/); 2: my($html,$html2); 3: if (!-e $file){ 4: $thebase =~ s/\/[^\/]+$/\/default/;