Hi All ;
   
  
I am new to this group.I am just started to learn perl.I want to 
program in perl or C
that it input text file(.txt) and it should find every Uppercase 
letters(Capital letter) in
the input file converts every capital letter say with one letter d and 
lower case letters(small letters) replaces with letter O.

for eg.(input file- eg1.txt)
>protein1
afagaDRTYUagagfaa
>protein 2
DFafagagRTUI

output file (eg2.txt)
>protein1
ooooodddddooooooo
>protein2
ddoooooodddd
   
  My code 
   
  while($string=<>) {
  $string=~ tr/[A-Z,a-z]/[d,o]/ ;
  print $string ;}
  
Please help me 
   


ppp ppp <[EMAIL PROTECTED]> wrote:  Hi All ;


I am new to this group.I am just started to learn perl.I want to 
program in perl or C
that it input text file(.txt) and it should find every Uppercase 
letters(Capital letter) in
the input file converts every capital letter say with one letter d and 
lower case letters(small letters) replaces with letter O.

for eg.(input file- eg1.txt)
>protein1
afagaDRTYUagagfaa
>protein 2
DFafagagRTUI

output file (eg2.txt)
>protein1
ooooodddddooooooo
>protein2
ddoooooodddd

My code 

while($string=<>) {
$string=~ tr/[A-Z,a-z]/[d,o]/ ;
print $string ;}

Please help me 


        
---------------------------------
Everyone is raving about the all-new Yahoo! Mail beta.

Reply via email to