B
Bob
I am trying to read in the contents of a file (which contains psuedo
variables) and then print the file's contents and have variable
substitution occur.
Example:
[file contains this text: "Your name is $name"]
open (HEADER, "< ../header.htm")
my @headerLines = <HEADER>;
my $name = "Freddy";
print_html("@headerLines");
When I do this, I get the contents of the file, but the variable does
not get substituted. So the output looks like this:
Your name is $name
Suggestions ? This is actually part of a much larger file read with
many more variables and I could really use substitution.
Thanks,
variables) and then print the file's contents and have variable
substitution occur.
Example:
[file contains this text: "Your name is $name"]
open (HEADER, "< ../header.htm")
my @headerLines = <HEADER>;
my $name = "Freddy";
print_html("@headerLines");
When I do this, I get the contents of the file, but the variable does
not get substituted. So the output looks like this:
Your name is $name
Suggestions ? This is actually part of a much larger file read with
many more variables and I could really use substitution.
Thanks,