Next | Tricks of the Wizards | 36 |
Before we see remember and gobackto, here's some syntax
You can use a glob as if it were a reference to any sort of thing.
For example:
$N = 119; $v = ${*N}; $r = \${*N};
$v now contains 119
$r now refers to $N so that $$r is 119.
In particular, if *g is a glob, %*g is its hash
*g->{key} looks up key in the hash
If $gr is a globref, *$gr is the glob
%*$gr is the glob's hash
*$gr->{key} looks up key in the hash
Next | Copyright © 2003 M. J. Dominus |