While goto $ref seems to be doing what you mean, it's technically a bug; goto has three forms, goto LABEL, goto EXPR, and goto &NAME. You should be saying goto &$ref, and goto $ref should be interpreted as the goto EXPR form (taking the stringification of $ref and using that as a label.)