Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^2: PerlIO file handle dup

by marioroy (Vicar)
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 surveying the Monastery: (6)
As of 2019-07-17 10:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?