in reply to Re^5: Unmatched [ in regex; marked by <-- HERE in m/[ <-- HERE ^]/
in thread Unmatched [ in regex; marked by <-- HERE in m/[ <-- HERE ^]/

Here's another way, but I can't say it's any less klutzy. There seems to be no way to avoid the use of some kind of operator for disambiguation.

use warnings; use strict; use constant STR => 'a string'; use constant STREF => \'ref to a string'; print qq{one way '${ \STR }' and another '${ +STREF }' \n}; print qq{and with another disambiguation '${ STREF() }' \n};

Output:

c:\@Work\Perl\monks>perl constant_interpolation_1.pl one way 'a string' and another 'ref to a string' and with another disambiguation 'ref to a string'