7stud has asked for the wisdom of the Perl Monks concerning the following question:
#Define three x variables: $x = 10; @x = (1, 2); sub x { print "x\n"; } $val = *x{ARRAY}; print "@{$val}", "\n"; --output:-- 1 2 $what = *x; print $what, "\n"; --output:-- *main::x $val = $what{ARRAY}; print "@{$val}", "\n"; --output:-- (newline)
What does $fh = *NAME accomplish, and how can I use $fh?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: typeglob: $var = *x ???
by ikegami (Patriarch) on Jun 16, 2011 at 00:53 UTC | |
by 7stud (Deacon) on Jun 16, 2011 at 01:17 UTC | |
by ikegami (Patriarch) on Jun 16, 2011 at 02:34 UTC | |
by 7stud (Deacon) on Jun 16, 2011 at 08:23 UTC | |
by ikegami (Patriarch) on Jun 16, 2011 at 15:30 UTC |