my $domain0 = "$ENV{'HTTP_HOST'}"; if $domain0 == "admin.domain.tld" { $err_cfg_dir = "$main::cfg{'GUI_ROOT_DIR'}/default_page"; } if $domain0 == "admin.domain2.tld" { $err_cfg_dir = "$main::cfg{'GUI_ROOT_DIR'}/default_page2"; }