in reply to constant name in variable

Your something could be eval. This works with "use strict".

An alternative:

my $value = do { no strict; &{$name} };
--Dave

Replies are listed 'Best First'.
Re: Re: constant name in variable
by shemp (Deacon) on Dec 02, 2002 at 20:43 UTC
    sure enough, eval works.
    I also figured out that $var->() will work, which i believe is efectively the same thing.
    Thanks