Re: Optimize the script

2008-07-05 Thread matt
On Jul 4, 4:08 am, [EMAIL PROTECTED] (Jet Speed) wrote: > Hi All, > > I put togather a piece of code with some help, to capture the output as > below from a file "cxout1" as below. I am sure this can be written in few > lines or even differnt way of getting the same out put with use of hash etc. >

Re: Optimize the script

2008-07-04 Thread jet speed
On 7/4/08, John W. Krahn <[EMAIL PROTECTED]> wrote: > > jet speed wrote: > >> Hi All, >> > > Hello, > > I put togather a piece of code with some help, to capture the output as >> below from a file "cxout1" as below. I am sure this can be written in few >> lines or even differnt way of getting the s

Re: Optimize the script

2008-07-04 Thread John W. Krahn
jet speed wrote: Hi All, Hello, I put togather a piece of code with some help, to capture the output as below from a file "cxout1" as below. I am sure this can be written in few lines or even differnt way of getting the same out put with use of hash etc. Kindly help me to optimize the code. A

Re: Optimize the script

2008-07-04 Thread jet speed
Hi Rob, Great, Thanks for sorting this out, Much appericiated. Cheers Js On 7/4/08, Rob Dixon <[EMAIL PROTECTED]> wrote: > > jet speed wrote: > > > > Great, Thanks it works. Perfect. > > > > I Will explore your recommendation for using seek File option. I will > read > > some doc. > > > > In yo

Re: Optimize the script

2008-07-04 Thread Rob Dixon
jet speed wrote: > > Great, Thanks it works. Perfect. > > I Will explore your recommendation for using seek File option. I will read > some doc. > > In your code, Pls explain what this piece of code does. > > $sl{$1}++ if /\bID=(CK\w+)/i; jet speed wrote: > > I think it finds the bit starting

Re: Optimize the script

2008-07-04 Thread jet speed
Hi Rob, I think it finds the bit starting with CK, if matches it stores in $sl($1) and finally prints the key value as. keys %sl, bec's all matches are same it strores only once. am i correct ? Pls correct me if am wrong. Many Thanks Js On 7/4/08, jet speed <[EMAIL PROTECTED]> wrote: > > Hi

Re: Optimize the script

2008-07-04 Thread jet speed
Hi Rob, Great, Thanks it works. Perfect. I Will explore your recommendation for using seek File option. I will read some doc. In your code, Pls explain what this piece of code does. $sl{$1}++ if /\bID=(CK\w+)/i; Many Thanks Js On 7/4/08, Rob Dixon <[EMAIL PROTECTED]> wrote: > > jet speed

Re: Optimize the script

2008-07-04 Thread Rob Dixon
jet speed wrote: > Hi All, > > I put togather a piece of code with some help, to capture the output as > below from a file "cxout1" as below. I am sure this can be written in few > lines or even differnt way of getting the same out put with use of hash etc. > Kindly help me to optimize the code. A

Optimize the script

2008-07-04 Thread jet speed
Hi All, I put togather a piece of code with some help, to capture the output as below from a file "cxout1" as below. I am sure this can be written in few lines or even differnt way of getting the same out put with use of hash etc. Kindly help me to optimize the code. Any help would be much apperic

Re: How can I optimize the script for reading big files?

2001-12-19 Thread nafiseh saberi
_ ? > Jenda Krynicky wrote: > > > > > How can I optimize the script for a big files ? > > > > > > > > > > Change it to : > > > > open(READ, "$ARGV[0]"); > > open(WRITE,"> $ARGV[1]"); > > >

Re: How can I optimize the script for reading big files?

2001-12-19 Thread Andrea Holstein
Jenda Krynicky wrote: > > > How can I optimize the script for a big files ? > > > > > > Change it to : > > open(READ, "$ARGV[0]"); > open(WRITE,"> $ARGV[1]"); > > while(defined($i = )) { > $i =~ s/\.Cure/\.f

Re: How can I optimize the script for reading big files?

2001-12-18 Thread John W. Krahn
"Jonathan e. paton" wrote: > > Agreed, however there is more that can be done. You want > to filter out non-matching lines ASAP, so you apply full > substitutions when there is a good chance of needing one. > > I suggest the following for the loop: > > while(defined()) { > > # Limit subst

Re: How can I optimize the script for reading big files?

2001-12-18 Thread Jonathan E. Paton
| > open(READ, "$ARGV[0]"); | > | > $wholeText = ""; | > | > while(defined($i = )) { | > $i =~ s/\.Cure/\.fa/g ; | > $i =~ s/cure-/fa-/g ; | > $i =~ s/class=Cure/class=fa/g ; | > $i =~ s/window.name!=\"frSheet\"/false/g ; | > $wholeText = join('', $w

Re: How can I optimize the script for reading big files?

2001-12-18 Thread Jenda Krynicky
!!! > > How can I optimize the script for a big files ? > > Thanks ! > > > open(READ, "$ARGV[0]"); > > $wholeText = ""; > > while(defined($i = )) { > $i =~ s/\.Cure/\.fa/g ; > $i =~ s/cure-/fa-/g ; > $i