Help for this page

Select Code to Download


  1. or download this
    my $pid = fork;
    die "can't fork: $!" if ! defined $pid;
    ...
    else {
        # child
    }
    
  2. or download this
    use 5.010;
    
    my $pid = fork // die "Can't fork: $!";
    if ...
    
  3. or download this
    use 5.010;
    
    ...
            my $child_pid = $_;
        }
    }
    
  4. or download this
    use 5.010;
    
    ...
            return qw( list context );
        }
    }
    
  5. or download this
    return         wantarray ? qw( list context ) :
           defined wantarray ? 'scalar context';
    
  6. or download this
    return tfu( wantarray,
                true  => sub { 'true' },
    ...
               defined $value ? $todo_for{ false }->() :
                                $todo_for{ undef }->();
    }