that looks like the very definition of dereferencing to me
I thought you meant $gv vs *$gv
it's not obvious that $val needs dereferencing.
Completely false.
"@foo" returns the list of elements in the array. "$foo" does not.
According to you, (A) and (B) and (C) should be the same?
A: @m = $x; B: @m = @$x; C: @m = $$x;
The only thing that may not be obvious is that globs can be "dereferenced" instead of having to do *$gv{ARRAY}.
As far as I can tell, the only time you don't have to dereference the variable is when you use it as a filehandle
Both the "@" and "print" operators accept a scalar containing a glob. The first peeks into the ARRAY slot. The latter peeks into the IO slot. Both "dereference" the glob.
In reply to Re^5: typeglob: $var = *x ???
by ikegami
in thread typeglob: $var = *x ???
by 7stud
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |