Help for this page

Select Code to Download


  1. or download this
    for ( 1..2 ) {
        threads -> create ( \&worker );
    }
    
  2. or download this
    for ( 1..2 ) {
       my $temp_scalar = threads -> create ( \&worker );
    }
    
  3. or download this
    $ perl pm_1228826.pl
    sum=1
    sum=2
    
  4. or download this
    use strict;
    use warnings;
    ...
        my $sum=$thr -> join;
        print "sum=$sum\n";
    }