in reply to double deference a variable

Maybe I am not comprehending the question, but to eval ?!
$IsNumber = '^\d+$'; ($rValue=~$IsNumber); # Returns 1 if the regex matches # Or this returns the numeric $rValue if it matches $IsNumber # else returns "" ($rValue=~$IsNumber && $rValue);
Shout me down if I've missed the point completely here.