ganeshk has asked for the wisdom of the Perl Monks concerning the following question:
main is supposed to be a package name. How does it also act as a hashref?main->{x} = 1; print $main->{x}; # prints 1
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: what does main->{x} = 1 do?
by ikegami (Patriarch) on May 14, 2008 at 00:29 UTC | |
by ganeshk (Monk) on May 14, 2008 at 00:57 UTC | |
|
Re: what does main->{x} = 1 do?
by samtregar (Abbot) on May 13, 2008 at 23:29 UTC | |
by ganeshk (Monk) on May 14, 2008 at 00:40 UTC | |
by ikegami (Patriarch) on May 15, 2008 at 05:02 UTC | |
by blazar (Canon) on May 14, 2008 at 22:20 UTC | |
by Jenda (Abbot) on May 14, 2008 at 23:42 UTC | |
|
Re: what does main->{x} = 1 do?
by wade (Pilgrim) on May 13, 2008 at 23:30 UTC | |
|
Re: what does main->{x} = 1 do?
by Burak (Chaplain) on May 14, 2008 at 09:20 UTC |