Greetings --
I am reading text sql commands) from a file, chopping it into sections
and then writing each section out to a different file. Within the text
are perl variables that I had expected to be interpolated as they were
written out to the new file but they are not.
Here is a sample line:
REVOKE SELECT ON $TABLE_NAME FROM PUBLIC;
$TABLE_NAME for example might be 'STUDENTS'.
Is there a reason that the text is not being interpolated when before it
is written out to the new file (either when it is read in or when it is
printed out)?
Here is a piece of my code:
########## CODE SNIPPET #####################
for $k ( @these_lines ) {
# for debugging
print "$TABLE_NAME\n";
print "K\t=>\t$k\n";
### SQL_OUT is the filehandle that I am writing to
print SQL_OUT "$k\n";
} ### CLOSE-FOR-K
produces this output in STDOUT:
TABLE_NAME => STUDENTS
K => REVOKE SELECT ON $TABLE_NAME FROM PUBLIC;
where I want to have :
K => REVOKE SELECT ON STUDENTS FROM PUBLIC;
########## CODE SNIPPET #####################
Thanks
Dan
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>