mister_t has asked for the wisdom of the Perl Monks concerning the following question:

If the string contains an environment variable delimeted by dollar signs ($). Is there an easy way of detecting, and replacing the variable with its value? For instance. Given that the variable BASE_ID has a value of 5.12 myfile$BASE_ID$.xxx should give me myfile5.12.xxx Thank you for any help.

Originally posted as a Categorized Question.

  • Comment on How do I substitute the value of a variable if it is found in a string?

Replies are listed 'Best First'.
Re: How do I substitute the value of a variable if it is found in a string?
by particle (Vicar) on May 21, 2002 at 21:21 UTC
    was my first answer to this same question posted four hours ago not good enough?

    or any of the other answers for that matter? please don't ask us to do your homework.

    Originally posted as a Categorized Answer.