Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Passing a sub reference which uses Parallel::ForkManager

by Anonymous Monk
on Apr 04, 2020 at 20:07 UTC ( [id://11115058]=note: print w/replies, xml ) Need Help??


in reply to [solved] Passing a sub reference which uses Parallel::ForkManager

Hi

Code should be runnable :) Incomplete code is incomplete ;) Intent/goal must be stated not implied

Have you read ?? Re: Please Explain the Parallel::ForkManager Idiom my $pid = $pm->start and next;, Mr. Peabody Explains fork() ?? Kids don't talk to parents

Regarding javascriptism, perl has arrows and perltidy

No

# $$data_ref{'fork_s'} = &$sixes( $#{$$array_ref} ); # # &{ $$data_ref{'fork_s'} }( # sub { # my $sn = "$_"; ## = number of sentence # $results{'SxW'}{"$sn"}++; # say "Results: " . pp( %results ); # }, # sub { # my $refe = $_[5]; # say "Refe2 empty" if !defined $refe; # if( defined( $refe ) ) { # say "Refe2 " . pp( $$refe{'SxW'} ); # } # } # );

Yes

$data_ref{'fork_s'} = $sixes->( $#$array_ref ); $data_ref{'fork_s'}->( sub { my $sn = "$_"; ## = number of sentence $results{'SxW'}{"$sn"}++; say "Results: " . pp( %results ); }, sub { my $refe = $_[5]; say "Refe2 empty" if !defined $refe; if( defined( $refe ) ) { say "Refe2 " . pp( $$refe{'SxW'} ); } } );

See also references quick reference

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11115058]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2024-04-19 23:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found