Are you, by any chance, using a lexical ('my') variable for $foo? Symbolic references only work with package variables:
#!/usr/bin/perl use strict; use warnings; our $foo="foo"; my $bar="f"; no strict 'refs'; print ${$bar.'oo'}, "\n";
(BTW, just in case you're intending to create enumerated variables like $var1, $var2, etc., consider using an array instead...)
In reply to Re: Variable name
by almut
in thread Variable name
by nsteiner
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |