#!/usr/bin/perl -w # Ejemplo escrito por Bruno Contreras use strict; my $RNA = "CAUACUAAGAUCGCGAUAUUAUUAGCGAUAUACGACU"; my $stop1 = 'UAA'; my $stop2 = 'UGA'; my $stop3 = 'UAG'; my ($total1,$total2,$total3,$total) = (0,0,0,0); while( $RNA =~ /$stop1/g ) { $total1++; } while( $RNA =~ /$stop2/g ) { $total2++; } while( $RNA =~ /$stop3/g ) { $total3++; } while( $RNA =~ /($stop1|$stop2|$stop3)/g) { $total++; } print "$total1|$total2|$total3|$total\n";
Bruno Contreras-Moreira