On Wed, 21 Aug 2002, Nandita wrote: > Thanks, but I forgot to mention in the beginning that i need to make this > modification only ONCE in my file- the ">" character comes up every few > lines, but I only want the title "ALIGNMENTS" in the beginning..i.e, it > shd not replace all the ">"s in my file.. > ? > sorry about that!
Try this instead #!/usr/local/bin/perl -w use strict; $^I = '~'; while (<>) { ?^>? && print "ALIGNMENTS:\n"; # perldoc perlop : the section under Regexp Quote-Like Operators print; } continue { reset if eof; # perldoc -f reset } > > > > > On Wed, 21 Aug 2002, Sudarshan Raghavan wrote: > > > On Tue, 20 Aug 2002, Nandita wrote: > > > > > Thanks for your message, this is how it looks: > > > > > > beginning of file : > > > > > > Reading High Probability Sequences producing High-scoring Segment Pairs: > > > Frame Score P(N)N > > > > > > EMBL:B88446 CpG0200B CpIOWAgDNA1 Cryptosporidium parv... +3 75 0.391 > > > EMBL:AQ935741 CpG2625B CpIOWAgDNA1 Cryptosporidium pa... +1 74 0.631 > > > EMBL:AQ855708 CpG1711B CpIOWAgDNA1 Cryptosporidium pa... -1 71 0.891 > > > EMBL:AQ935455 CpG2480A CpIOWAgDNA1 Cryptosporidium pa... +2 69 0.971 > > > EMBL:AQ450103 500008A04.x1 CpIOWAM13mp18gDNA1 Cryptos... -1 69 0.981 > > > EMBL:AQ254466 CpG0842A CpIOWAgDNA1 Cryptosporidium pa... +2 68 0.991 > > > EMBL:AQ935528 CpG2517B CpIOWAgDNA1 Cryptosporidium pa... -2 67 0.9981 > > > EMBL:AQ854869 CpG2093B CpIOWAgDNA1 Cryptosporidium pa... +2 67 0.9981 > > > EMBL:AQ450236 500009E03.x1 CpIOWAM13mp18gDNA1 Cryptos... -1 65 0.99991 > > > EMBL:AQ003639 CpG0296A CpIOWAgDNA1 Cryptosporidium pa... +2 5 0.999901 > > > > > > "ALIGNMENTS:" > > > > > > >EMBL:B88446 CpG0200B CpIOWAgDNA1 Cryptosporidium parvum genomic, genomic > > > survey sequence. > > > Length = 508 > > >EMBL AQ935528 Cp.... > above is the word "ALIGNMENTS:" which is not present and which i'd like > to > > > add in each file. i figure i'd have to write out a reg exp- something like > > > "newline followed by ">" ...but am not able to get a good start..-and dont > > > know how to go abt the actual task- figured it had to do with "printing > > > to" a variable in which i stored the file value... > > > am chewing on it.. > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]