in reply to Can I move a substitution string into a constant?

Perl constants are actually functions, so try
my $tmp = quotemeta(TABLE_NAME . '.'); $stmt =~ s/$tmp//g;

Update: Fixed code, because I didn't test before I posted.

- Tom