in reply to variable initilization

That's easy ... just assign $KitDir at the beginning with the correct value, and never assign a value to it again. Especially, don't do
$KitDir = $ENV{'KITDIR'};
at the end of your script.
HTH, Rata