$variableB
will never have a value because you never assign to it.
'a=s' => \$variableA,
gives $variableA
a value because, when Getopt::Long is given a scalar ref, it assigns the option's value to that scalar.
On the other hand,
'b' => sub { \$variableB, &this_subroutine; goto NOWGOHERE; },
gives Getopt::Long a code reference, which it can't assign the option value to.
Based on the docs, it appears that it passes the option name and option value to the coderef as parameters, in which case
'b=s' => sub { $variableB = $_[1]; this_subroutine(); goto NOWGOHERE; },
should probably do what you want.