in reply to Symbolic reference with strict "refs"
You can also use eval:
#! perl use strict; use warnings; { package Aardman; our @ISA = qw( Wallace Gromit ); } { package main; my $pkg = 'Aardman'; my $var = $pkg . '::ISA'; my $ref = eval "\\\@$var"; print join(', ', @$ref), "\n"; }
Output:
Wallace, Gromit
(But, for the reasons given by davido and tobyink above, you should probably just use no strict 'refs'.)
Athanasius <°(((>< contra mundum
|
|---|