"...use v5.24;..."
"Dereferencing a reference to a typeglob" can be done with Postfix Dereference Syntax (i.e. $globref->**). Some examples:
$ perl -v | head -2 | tail -1 This is perl 5, version 24, subversion 0 (v5.24.0) built for darwin-th +read-multi-2level $ alias perle alias perle='perl -Mstrict -Mwarnings -Mautodie=:all -E' $ perle 'use 5.024; my $x = \*STDERR; say "OUT"; say { $x->** } "ERR"' OUT ERR $ perle 'use 5.024; my $x = \*STDERR; say "OUT"; say { $x->** } "ERR"' + > /dev/null ERR $ perle 'use 5.024; my $x = \*STDERR; say "OUT"; say { $x->** } "ERR"' + 2> /dev/null OUT $
I wrote a fair amount about using this syntax in general, just yesterday: "Re^3: Syntax Question Related to "join" on a Complex Data Structure [postderef and postderef_qq]". You'll find examples of "$arrayref->@*", which may be closer (than "$globref->**") to the type of thing you're after.
— Ken
In reply to Re: Dereferencing a reference to a typeglob? [Postfix Dereference Syntax]
by kcott
in thread Dereferencing a reference to a typeglob?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |