What you're trying to do is not a good idea. The contents read in from '$inputfile' is text. Using that text as a reference to a variable is a way to ask for all sorts of pain.
My suggestion would be to put a plain text 'placeholder' and then do a search and replace within your script.
select * from all_tables where table_name = 'PLACEHOLDER'
$readline =~ s/PLACEHOLDER/$table_name/;
Because trust me - using variable names as 'plain text' is bad news for all sorts of reasons. If you're really set on going that way, you will want to look at 'references'. See: perlreftut.
In reply to Re: Storing a variable in a file and processing within the script
by Preceptor
in thread Storing a variable in a file and processing within the script
by tony@perlmonks.org
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |