in reply to setting ENV variables

the shell startup files are one place where env vars are set.

if you mean setting them inside a perl script, hmmmm I would search the perl docs for "environment variables"

yes, there is a module called "Env" which should help you read and set variables...

perldoc Env should help with the details