I need the $main::pageVar variable in the line below to interpolate, and I'm not sure how I would do it. $retVal=~s/showpos\"\svalue\=\"1\"/showpos\"\svalue\=\"$main::pageVar1\"/;