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

Constants, just like functions, don't automatically interpolate into strings or regular expressions. This behavior is documented in the POD for the constant module:

Constants defined using this module cannot be interpolated into strings like variables.

You can however, use the nifty-ugly obfu trick:

use constant TABLE_NAME => 'table'; my $string = "The constant TABLE_NAME contains '@{[TABLE_NAME]}'.\n";

...or to fit your particular needs:

$stmt =~ s/@{[TABLE_NAME]}.//g;


Dave


"If I had my life to live over again, I'd be a plumber." -- Albert Einstein