use constant FOO => 'bar'; my $x = FOO; $x = qr/$x/; "somehting" =~ $x #### our $FOO = 'bar'; my $x = qr/$FOO/; "something" =~ $x;