But you are passing them inside single quotes, and what goes inside single quotes is not interpolated.
Wrong. The single quotes are inside a double-quoted string.
The original version is not best practice, but it won't fail until one of the interpolated variables contains an embedded quote.
my $name = 'Larry'; my $sql = "Insert into Users (name) values ('$name')"; print $sql; # Insert into Users (name) values ('Larry')
In reply to Re^2: Capturing SQL errors in Perl
by Narveson
in thread Capturing SQL errors in Perl
by Red_Dragon
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |