P0w3rK!d has asked for the wisdom of the Perl Monks concerning the following question:
Why is it that I can create a regular hash and fill it as follows?
our $HSH();
our %HSH();
$HSH{123}{456} = "foo.xml"; # works fine
..but when I create a shared hash and populate it the same way it fails?
our $HSH2 : shared = ();
our %HSH2 : shared = ();
$HSH2{123}{456} = "foo.xml"; # fails
The error is as follows:
Invalid value for shared scalar at C:\foo.pl line 248.
-P0w3rK!d
Fixed typos at author's req - dvergin 2003-05-20
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Threading: Invalid value for shared scalar
by BrowserUk (Pope) on May 20, 2003 at 19:58 UTC | |
by P0w3rK!d (Pilgrim) on May 20, 2003 at 20:18 UTC | |
by spazm (Monk) on Oct 01, 2009 at 21:06 UTC | |
by hexcoder (Deacon) on Jul 03, 2015 at 12:05 UTC | |
by BrowserUk (Pope) on Jul 03, 2015 at 12:42 UTC | |
by Anonymous Monk on Feb 26, 2015 at 13:10 UTC | |
Re: Threading: Invalid value for shared scalar
by djantzen (Priest) on May 21, 2003 at 01:36 UTC | |
by Anonymous Monk on Dec 10, 2014 at 16:58 UTC |