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