Help for this page

Select Code to Download


  1. or download this
    sub sub1 { print 'sub1 ran' }
    sub sub2 { print 'sub2 ran' }
    
    my @refs = (\&sub1, \&sub2);
    $_->() foreach @refs;
    
  2. or download this
    use strict;
    use warnings;
    ...
    }
    
    1 while waitpid(-1, WNOHANG) > 0;  # wait for all children