Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Odd behaviour of Parallel::ForkManager

by Corion (Patriarch)
on Nov 20, 2015 at 07:45 UTC ( [id://1148204]=note: print w/replies, xml ) Need Help??


in reply to Odd behaviour of Parallel::ForkManager

You have enabled use warnings;. The next step is to read the warnings that Perl outputs:

C:\Users\Corion>perl -wc Projekte\tmp.pl Found = in conditional, should be == at Projekte\tmp.pl line 37. Found = in conditional, should be == at Projekte\tmp.pl line 41. Projekte\tmp.pl syntax OK

What have you done to address these warnings?

Replies are listed 'Best First'.
Re^2: Odd behaviour of Parallel::ForkManager
by ravi45722 (Pilgrim) on Nov 20, 2015 at 08:31 UTC

    I replaced "=" with "eq". Now the warning is not there.

      If you expect interleaved output, you will need to disable output buffering and make your code much slower:

      sub alpha { foreach my $i (900 .. 1900) { print 'A',"\t"; sleep rand(2); } } sub numeric { foreach my $j (1 .. 1000) { print $j,"\t"; sleep rand(2); } } # Make print() output unbuffered; $| = 1; LINKS: foreach my $linkarray (@links) { $pm->start and next LINKS; # do the fork ...
      A reply falls below the community's threshold of quality. You may see it by logging in.

Log In?
Username:
Password:

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

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

    No recent polls found