in reply to How to assign a variable with a value read from a config file

You're asking two questions.
  1. Q: How do I read a value from a file and assign it to a variable.

    A: Look in the Q&A section.

  2. Q: How do I read a value that is in my environment and assign it to a variable.

    A: Look in the Q&A section. Or, read a Perl manual.

    Or, cause I'm nice, try my $param = $ENV{PARAM}; ... Perl is nice and puts the entire environment into %ENV for you.

------
We are the carpenters and bricklayers of the Information Age.

Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.