Sustitucion de texto

Victor Ramon Aguilar Ocampo aguilar@servidor.unam.mx
Tue, 25 Nov 1997 19:52:50 -0600 (CST)


  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.
  Send mail to mime@docserver.cac.washington.edu for more info.

---559023410-684387517-880509170=:21101
Content-Type: TEXT/PLAIN; charset=US-ASCII


Hola Adrian:

Esto es lo que te puedo recomendar, te induce unas cuantas lineas de 
ruido pero creo que sirve.

Inicia Program-ita:

#!/opt/leng/perl/bin/perl
 
open(S,"nada");   <-- Un archivo que contiene las lineas que debes procesar
open(D,">nada.out"); <- El archivo de resultados
while(<S>) {
 
chop($linea=$_);

# si hay patron lo tomas.
# e imprimes los elementos con su respectivo patron @80 o @90

if ( index($linea,"@") == 0 ) { 
        $patron=substr($linea,0,4);
        substr($linea,0,4)="";
}

@c=split(/\;/,$linea);

#Imprime los elementos con su patron correspondiente 
foreach $i (@c) {
 
#quita blancos del principio del elemento
  while ( index($i," ") == 0 ) { substr($i,0,1)=""; }
print D "$patron$i\n";
}

 
}
close(S);
close(D);




TERMINA Program-ita .....




Asi esta el archivo nada

@080aspartylglucosaminidase; lysosomal storage diseases;
    malocclusion; dental arch; tooth|
@090FOLLOW-UP; ASPARTYLGLYCOSAMINURIA; GLYCOASPARAGINASE; 
    MACROGLOSSIA; MUTATIONS; FEATURES; DISORDER; DISEASE; FAMILY|



Asi entrega el archivo nada.out

@080aspartylglucosaminidase
@080lysosomal storage diseases
@080malocclusion
@080dental arch
@080tooth|
@090FOLLOW-UP
@090ASPARTYLGLYCOSAMINURIA
@090GLYCOASPARAGINASE
@090     <----------- Como veras hay un error pero creo que ayuda algo.
@090MACROGLOSSIA
@090MUTATIONS
@090FEATURES
@090DISORDER
@090DISEASE
@090FAMILY|



Saludos !

Y dejame saber si te ayudo en algo mi propuesta !


----------------------------------------------------------------
                  Academic Computing Services      
            National Autonomus University of Mexico

     
   Victor Ramon Aguilar Ocampo
   DGSCA - UNAM
   E-mail:     aguilar@servidor.unam.mx


   " Solo tienes dos cosas en tu hacer, las Razones y 
     los Resultados. Las Razones no cuentan  ".

----------------------------------------------------------------



---559023410-684387517-880509170=:21101
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="nada.pl"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.SV4.3.91.971125195250.21101C@servidor>
Content-Description: 

IyEvb3B0L2xlbmcvcGVybC9iaW4vcGVybA0KDQpvcGVuKFMsIm5hZGEiKTsN
Cm9wZW4oRCwiPm5hZGEub3V0Iik7DQp3aGlsZSg8Uz4pIHsNCg0KY2hvcCgk
bGluZWE9JF8pOw0KDQppZiAoIGluZGV4KCRsaW5lYSwiQCIpID09IDAgKSB7
IA0KCSRwYXRyb249c3Vic3RyKCRsaW5lYSwwLDQpOw0KICAgICAgICBzdWJz
dHIoJGxpbmVhLDAsNCk9IiI7DQp9DQoNCkBjPXNwbGl0KC9cOy8sJGxpbmVh
KTsNCg0KZm9yZWFjaCAkaSAoQGMpIHsNCg0KI3F1aXRhIGJsYW5jb3MgZGVs
IGVsZW1lbnRvDQogIHdoaWxlICggaW5kZXgoJGksIiAiKSA9PSAwICkgeyBz
dWJzdHIoJGksMCwxKT0iIjsgfQ0KcHJpbnQgRCAiJHBhdHJvbiRpXG4iOw0K
fQ0KDQoNCn0NCmNsb3NlKFMpOw0KY2xvc2UoRCk7DQoNCg==
---559023410-684387517-880509170=:21101--