Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Reduce CPU utilization time in reading file using perl

by madtoperl (Pilgrim)
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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (10)
As of 2017-06-26 18:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (585 votes). Check out past polls.