in reply to Re^2: Dereferencing in blessed object
in thread Dereferencing in blessed object

The main script has use strict; but it seems that does then apply to the module it calls...I know that now!

The scope of strict and many other pragmas like warnings is lexical: if you put it at the top of a file, its scope is only that file, and does not extend to any files included with do, require, or use.

But - I feel sure there is a more elegant way!

Though I concur with hippo that braces are easiest here, in the spirit of TIMTOWTDI note there's also the /e modifier: $db =~ s/_.+?_/"_$dbname"."_"/e;