in reply to Re: Dynamically Building Variable Names
in thread Dynamically Building Variable Names

Just to hammer the point home even more - your second example is identical to
#!/usr/bin/perl $barbaz = "something here"; foo("bar", "baz"); sub foo { $name = join('', @_); # Build varname print $main::{$name}, "\n"; }

In other words, you're using a hash - the package's symbol table. However, if you don't want to clobber something, use your own hash.