in reply to Using vars in a var
What you show us is not what you are doing. Are you sure you are using double quotes (") rather than single quotes (') when you set $htmlvar?
use warnings; use strict; my $price = "50"; print "$_\n" for "<li>The price is \$$price</li>", '<li>The price is \ +$$price</li>';
Prints:
<li>The price is $50</li> <li>The price is \$$price</li>
Maybe you need to give us some code we can actually run that shows the problem if quoting is not the issue? (See I know what I mean. Why don't you? and SSCCE.)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Using vars in a var
by htmanning (Friar) on Nov 02, 2022 at 04:06 UTC | |
by GrandFather (Saint) on Nov 02, 2022 at 05:32 UTC |