in reply to Dollar Bracket Star ${*...}
That's dereferencing of a glob reference, admittedly not a very common construct.
> ${*$ftp}{KEY}
That's accessing the %hsh for $ftp=\*hsh with $hsh{KEY}
> I've been programming in perl for quite some time now
you might have seen constructs like \*DATA before, those are glob references.
DB<7> x \*DATA 0 GLOB(0x2d92040) -> *main::DATA DB<8> p ref \*DATA GLOB
I hope it's clearer now.
Bareword filehandles and globs are historically linked. (Perl4 legacy IIRC)
or better phrased the slot for filehandles in typeglobs has no own sigil like other types, hence you can only use *glob for referencing them.
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Dollar Bracket Star ${*...}
by snoopyjc (Initiate) on Dec 27, 2021 at 23:54 UTC |