in reply to Dereferencing a reference to a typeglob?

Using the postfix syntax, you can chain the operations to first dereference the globref, then the scalarref:

$ alias perle alias perle='perl -Mstrict -Mwarnings -Mautodie=:all -E' $ perle 'our $a = 25; my $ra = \*a; say $ra->*{SCALAR}->$*' 25

Perl has a number of special variables[perlvar]: $a is one of them (used mainly when sorting); *a is its typeglob.

$ perle '1 for sort { say +(\*a)->*{PACKAGE}; say +(\*a)->*{SCALAR}->$ +*; say $a } 1 .. 3' main 1 1 main 2 2

There's also a $b. Everything that applies to $a; also applies to $b.

— Ken