Your post is unreadable -- you must have seen that when you previewed it. In future, please take more care when posting.
Looking at the source code of this page, I'm able to see that you start off with an eval that's missing it's first character -- if that's true, you need to take more care with the presentation of your problem.
Typically you will get called out if your code doesn't use strict, because if it does, and it compiles cleanly, we'll have a much better chance of a) understanding the code and b) helping you with your problem. I'm pretty sure that this code doesn't compile cleanly -- fix that issue, re-post the code, and we'll have a better chance of helping you.
This code appears to call a routine called outprint which I'm not familiar with (Ibu I can guess what it might do), as well as referring to variables using the ${variable} format instead of the more usual $variable format. The first format is only required when variable interpolation might not work as expected.
Your variable names are capitalized, which is not the preferred format -- instead of ${LPD}, consider using $lpd.
None of your variables are declared, either by being initialized using constants or as parameters to some unseen function. The %Env does get initialized -- perhaps that's what you thought you were accessing $ENV{XXX_TOP}.