|
|
| There's more than one way to do things | |
| PerlMonks |
Re: Using vars in a varby davido (Cardinal) |
| on Nov 02, 2022 at 16:25 UTC ( [id://11147924]=note: print w/replies, xml ) | Need Help?? |
|
There is nothing magical about the database portion of this; it's just a distraction. If $htmlvar contains what you want it to, it will contain that whether you print is value or UPDATE it into a text-based field in a database using placeholders and execute(). So set up a test that eliminates the confusion of the database.
The output will be:
In response to your question someone suggested that you probably were using single quotes. You followed up by stating that you tried with double quotes also, and still had the problem. If that's the case, please provide code that exhibits the incorrect behavior while printing to STDOUT rather than updating into a database. If it really only happens when updating into the database, please provide an example where you are printing to STDOUT and updating into the database, and getting something different in the database than what you see on STDOUT. Dave
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||