use Scalar::Util qw(dualvar); $x = dualvar 4711, "string"; print $x, "\n"; print $x+0, "\n"; # ergibt: # string # 4711