|laziness, impatience, and hubris|
Substituting Variables while reading text fileby mohanm_eee (Initiate)
|on Aug 05, 2014 at 17:48 UTC ( #1096329=perlquestion: print w/replies, xml )||Need Help??|
mohanm_eee has asked for the wisdom of the Perl Monks concerning the following question:
I have a text file as below and saved it as "file.txt""create variable $VAR alarm_object 0"
Iam trying to read this in a perl script and printing it by substituting the "$VAR" variable
I want the output as"create variable TEMP_VAR alarm_object 0"
I tried to achieve this using eval function. It is not working as expected.How can i achieve this in perl?
Back to Seekers of Perl Wisdom