# or: my $ref = "str$_"; # this is a purely symbolic reference, access is the same as above #### my $class = 'CGI'; my $version; { no strict 'refs'; $version = ${"${class}::VERSION"}; use strict; } print $version # e.g. 3.05 on my machine