Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
If I have a lexical reference to a glob
my $glob = Symbol::gensym;
How can I assign an anonymous hash to it? This doesn't work
*$glob{HASH} = { a => 1 };
Gives "Can't modify glob elem in scalar assignment"
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Assigning a reference to to a glob
by chromatic (Archbishop) on Oct 26, 2007 at 06:57 UTC | |
by Anonymous Monk on Oct 26, 2007 at 07:25 UTC | |
by BrowserUk (Patriarch) on Oct 26, 2007 at 19:09 UTC |