in reply to Using a varabile contained within another variable?

First of all, in this piece of code, $y doesn't have anything to do with $x because it's single quoted, so $y contains a string which looks like $x

You might want to ref:

my $x = 1; my $y = \$x; $$y++; print $x;

Update: It turned out that $y has something to do with $x after all.. my bad. see lemming's post below..


He who asks will be a fool for five minutes, but he who doesn't ask will remain a fool for life.

Chady | http://chady.net/