note
BrowserUk
<p>Seems to be a problem with your build of perl rather than perl itself, in that I don't get any errors (other than the missing semicolons) running your snippet under 5.8.2/AS 808
</p>
<code>
This is perl, v5.8.2 built for MSWin32-x86-multi-thread
Binary build 808 provided by ActiveState Corp. http://www.ActiveState.com
</code>
<p>That said, your snippet obviously isn't a direct c&p of your failing code (given the syntax errors), and the partial error message you give "Invalid value for shared scalar at..." is usually a compile or runtime error, not a crash. So maybe you should post a more complete example?
<code>
P:\test>perl -Mthreads -mthreads::shared
my( %h ) : shared;
my $var = 'hello';
$h{ $var } = 123;
print $h{hello};
^Z
123
</code>
<div class="pmsig">
<div class="pmsig-171588">
<hr />
<font size=1 >
<div>Examine what is said, not who speaks.</div>
"Efficiency is intelligent laziness." -David Dunham<br />
"Think for yourself!" - [Abigail-II|Abigail] <br />
</font>
</div>
</div>
340172
340172