$KitDir = cwd; $KitDir =~ s|/|\\|g; $ENV{'KITDIR'} = $KitDir after the 1000 lines of script they are using like this ,, $KitDir = $ENV{'KITDIR'}; if ($KitDir eq "") { $KitDir = $Config::Conn{KitDir}; }