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.
>
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
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
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
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
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
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
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
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
_
?
> Jenda Krynicky wrote:
> >
> > > How can I optimize the script for a big files ?
> > >
> > >
> >
> > Change it to :
> >
> > open(READ, "$ARGV[0]");
> > open(WRITE,"> $ARGV[1]");
> >
>
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
"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
| > 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
!!!
>
> 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
14 matches
Mail list logo