Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

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

This is perl, v5.8.2 built for MSWin32-x86-multi-thread Binary build 808 provided by ActiveState Corp. http://www.ActiveState. +com

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?

P:\test>perl -Mthreads -mthreads::shared my( %h ) : shared; my $var = 'hello'; $h{ $var } = 123; print $h{hello}; ^Z 123

Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"Think for yourself!" - Abigail

In reply to Re: threads::shared hash by BrowserUk
in thread threads::shared hash by fxmakers

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2023-02-04 02:02 GMT
Find Nodes?
    Voting Booth?
    I prefer not to run the latest version of Perl because:

    Results (30 votes). Check out past polls.