perl -Mstrict -le 'no strict "refs";use vars qw($x $xr $y); $x = 8;$xr = "x"; $y = $$xr; print $y;'
This works because you can only use symbolic references where the variables are visible in the package symbol table; lexical ( i.e. my() ) variables are not (as you can confirm with the Perl debugger).
Camel 3rd Ed. Ch. 8 refers*
*Sorry
In reply to Re: (jeffa) Re: scalar ref help?
by slife
in thread scalar ref help?
by jettero
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |