I am hurting here, been tasked with trying to add a bunch of new content to this script, but since it was written 10 years ago and continuously patched up badly since then, I have no clue what does what anymore..can someone comment in text that will at least explain what the different routines do?

#FIX 24/07/2003 - explanation underneath if (!(-e $cfg_file)) { #Test if the file contained in the variable "$cfg_file" exists, if it does if ($ENV{'WINDIR'}) { #If the system environment has a variable called "WINDIR" $pt = $ENV{'SCRIPT_FILENAME'}; #Put the contents of the system environment variable "SCRIPT_FILENAME" into the perl var "$pt" $pt = $ENV{'PATH_TRANSLATED'} if $ENV{'PATH_TRANSLATED'}; #Put the contents of the system environment variable PATH_TRANSLATED into the pel var "$pt"

only if the variable exists in the #system environment. $pt =~ s/\\/\//g; #Change all the backslashes (\) into forward slashses in the variable "$pt" @m = split(/\//,$pt); pop @m; #6) Split up the path contained in the perl variable "$pt" into parts and put them in the array "@m", then remove the

last path #part on the right, for eg, "/one/two/three" would remove the "three". $cfg_file = join("\x2F",@m).'/formprocessorpro.cfg'; #Join up the paths again, putting a forward slash in between (0x2f is a forward slash

character) and append the string #'/formprocessorpro.cfg', and put the result into the perl var "$cfg_file" } $cfg_file =~ s/\/\//\//g; #Replace "//" for "/" (in case there are any double slashes in the string) and put into "$cfg_file" }