rad7 has asked for the wisdom of the Perl Monks concerning the following question:
Hello Perl Gaints,
I have a file qry.txt. It has list of queries. I have written it with the variable itself. That is
Eg:
select * from emp where emp=$name; select * from sal where code=$code; ...
Now i am reading this file ,get the query one by one, assign it to a variable $qryvar and then exceute it one after the other. The problem is that, the variables $name and $code are not getting parsed.The values are not assigned to them. They stay as the same $name $code. How to bring the variable's value in the query now?
How to accomplish this?
Best Regards,
rad
20050111 Janitored by Corion: Moved from PMD to SoPW, added formatting
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Parse $ Variable in text file
by insaniac (Friar) on Jan 11, 2005 at 10:46 UTC | |
by Juerd (Abbot) on Jan 11, 2005 at 14:30 UTC | |
by gellyfish (Monsignor) on Jan 11, 2005 at 15:17 UTC | |
by insaniac (Friar) on Jan 11, 2005 at 15:09 UTC | |
|
Re: Parse $ Variable in text file
by Anonymous Monk on Jan 11, 2005 at 10:06 UTC | |
|
Re: Parse $ Variable in text file
by Joost (Canon) on Jan 11, 2005 at 20:58 UTC | |
|
Re: Parse $ Variable in text file
by ZlR (Chaplain) on Jan 12, 2005 at 15:22 UTC |