use constant TABLE_NAME => 'table'; my $string = "The constant TABLE_NAME contains '@{[TABLE_NAME]}'.\n"; #### $stmt =~ s/@{[TABLE_NAME]}.//g;