I don't know much about %ENV, I rarely use it. If you need to know what user you're running as my guess would be to check $> and $< against /etc/passwd or use POSIX;. I definitely wouldn't trust %ENV, since it is passed to the program at execution time and could be modified to fake values.
I would also advise reading perlsec if you're writing any system that needs to be secure.
In reply to Re^3: Obtaining %ENV values via su cmd
by Trizor
in thread Obtaining %ENV values via su cmd
by chrism01
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |