Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Reduce CPU utilization time in reading file using perl

by madtoperl (Monk)
on Sep 27, 2013 at 16:07 UTC ( #1056015=perlquestion: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    tie @lines, 'Tie::File', "testfile.dat" or die "Can't read file: $!\n"
    +;
    $linecount = $#lines+1;
    ...
            $hash{$No.$date} = $type."@".$No."@".$date;
    }
    untie @lines;
    
  2. or download this
    
    PROCESS TIME
    ...
    
    PID     COMMAND           %CPU  TIME      #TH   #WQ   #PORT #MREGS RPR
    +VT   RSHRD   RSIZE   VPRVT   VSIZE   PGRP   PPID   STATE     UID   FA
    +ULTS    COW      MSGSENT     MSGRECV     SYSBSD     SYSMACH     CSW  
    +     PAGEINS KPRVT   KSHRD   USER
    perl5.12          99.9  00:08.58  1/1   0     22    56+    99M+    124
    +4K 
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1056015]
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2014-12-19 06:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (72 votes), past polls