Help for this page

Select Code to Download


  1. or download this
    push @s, &share( { $cmd => time } }; ## The & before share() is import
    +ant here; and one of the few times you should ever use it.
    
    ...
    
    my %hash : shared = ( $cmd => time() );
    push @s, \%hash;
    
  2. or download this
    my @array : shared;
    $array[ 0 ] = 'fred'; ## ok
    ...
    my %hash : shared = ( 'a' .. 'z' );
    $array[ 3 ] = \%hash; ## OK
    ...
    
  3. or download this
    lock @s;
    push @s, &share( { $cmd => time() } ); 
    ...
    ...
    lock %{ $s[ 9 ] };
    $s[ 9 ]{ $cmd } = $newtime;