Recent versions of Perl (since 5.8) have shipped with Scalar::Util that allows you to define your own dualvars. (The module is also available on CPAN for earlier versions of Perl.)
use 5.010;
use Scalar::Util qw( dualvar );
my $x = dualvar(7, "Seven");
say "$x";
say $x+0;
perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'
|