Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^2: Perl thread confustion

by 7stud (Deacon)
on Feb 15, 2013 at 07:00 UTC ( [id://1018851]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    {
        my $x = 20;
    ...
    
    --output:--
    20           #…yet the sub can still see $x
    
  2. or download this
    use threads;
    use threads::shared;
    ...
    
    --output:--
    20
    
  3. or download this
    use threads;
    use threads::shared;
    ...
    
    --output:--
    <blank line>    #but the thread can't see $x
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1018851]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2024-03-28 10:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found