in reply to double deference a variable

One of the constructs of this simple language is: MyVar IsNumber - a true bool if MyVar turns out to be a number.
This is not exactly what you're asking for, but may I point you towards the module Regexp::Common? No need to reinvent that wheel. Then, with
use Regexp::Common 'RE_ALL';
at the top of your generated script, the original expression can become:
$MyVar =~ RE_num_real()