Results 1 to 4 of 4
Thread: Help with Perl Please
Jan 15, 2000, 08:41 #1
- Join Date
- Oct 1999
- 0 Post(s)
- 0 Thread(s)
I Have a problem with a Perl script that reads a line from a file which has variable names in it and when it prints the variable names are printed as a literal.
the line in the file:
$var01 blah blah blah $var02 blah blah
in the script:
$var01 = "name1";
$var02 = "name2";
$line1 = <INF>;
print "<P> $line1 </P>";
this prints the line just as is in the file:
<P> $var01 blah blah blah $var02 blah blah </P>
Is there a way to make the script print the contents of the variables instead of just the variable itself?
What I need is:
<P> name1 blah blah blah name2 blah blah </P>
Could anyone be so kind as to help me with this?
Thank you in advance for your cooperation