Well, while I would recommend using different approaches to something like this, soft references seems like what you're heading for:
my $x = 1 ;
my $y = 'x' ;
$$y++ ; # $x now == 2
You can't use this while using strict... most would consider that a feature =) Like I said, I'd try to find another way to approach whatever problem you're coding for. Since I don't know anything about it (perhaps this is just a learning exercise), I can't begin to offer more help in that regard.
If you do have a particular problem you're coding for, feel free to ask about alternative methods. TMTOWTDI, after all.
HTH
-Ducky |