Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^2: PerlIO file handle dup

by marioroy (Priest)
on Sep 03, 2018 at 01:17 UTC ( #1221595=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/opt/perl/bin/perl
    use strict;
    ...
        $mutex->unlock;
    }
    
  2. or download this
    #!/opt/perl/bin/perl
    use strict;
    ...
    close $fh;
    print "\n";
    
  3. or download this
    #!/opt/perl/bin/perl
    use strict;
    ...
    close $fh;
    print "\n";
    
  4. or download this
      time perl script_sem.pl   | wc -l     # 0.543s OP's example
      time perl script_mutex.pl | wc -l     # 0.663s Ditto, MCE::Mutex
      time perl script_mce.pl   | wc -l     # 0.225s MCE, no chunking
      time perl script_chunk.pl | wc -l     # 0.077s MCE, chunking enabled
    
  5. or download this
      time perl script_sem.pl   | wc -l     # 1.072s OP's example
      time perl script_mutex.pl | wc -l     # 0.726s Ditto, MCE::Mutex
      time perl script_mce.pl   | wc -l     # 0.255s MCE, no chunking
      time perl script_chunk.pl | wc -l     # 0.112s MCE, chunking enabled
    
  6. or download this
      time perl script_sem.pl   | wc -l     # 1.849s OP's example
      time perl script_mutex.pl | wc -l     # 0.803s Ditto, MCE::Mutex
      time perl script_mce.pl   | wc -l     # 0.339s MCE, no chunking
      time perl script_chunk.pl | wc -l     # 0.179s MCE, chunking enabled
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (10)
As of 2019-06-19 14:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Is there a future for codeless software?



    Results (88 votes). Check out past polls.

    Notices?
    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!