Bharath666 has asked for the wisdom of the Perl Monks concerning the following question:
Hi I am writing a perl script in which I have a variable name say $INST whose value is set to "C". Then I opened a file for reading. This file contains the above variable entries(ex VAR=$INST/dirivebase/program). Now I tried to read this line from the file and assign the value after '=' symbol to another variable,here I am not getting $INST value(i.e "C" which is declared previously in the script),but instead $INST is observed to be assigned as it is. Please tell me how can I assign the $INST value after reading from the file
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: how to read perl variable from a line read from a file
by marto (Cardinal) on Jan 31, 2013 at 12:30 UTC | |
|
Re: how to read perl variable from a line read from a file
by Athanasius (Archbishop) on Jan 31, 2013 at 13:18 UTC | |
|
Re: how to read perl variable from a line read from a file
by Anonymous Monk on Jan 31, 2013 at 15:17 UTC | |
by Bharath666 (Novice) on Jan 31, 2013 at 16:03 UTC | |
by Anonymous Monk on Jan 31, 2013 at 16:39 UTC | |
|
Re: how to read perl variable from a line read from a file
by parv (Parson) on Jan 31, 2013 at 13:05 UTC |