perl - How can I put N's in my final string -


i'm beginner in perl im have problems writing script. want script put letter n 1 number of times basis in length previous check. ns have in final of string inside .txt. strings begin > , have 'face':

a1_23abr2014_53_cc07.p10r_e07_009.ab1

attgccttttgctagcttatagaataataattcatataaacaaaaaatat tttatattatttaaaaataaataaaccaaataaagtcattgttgatccaa ttgaacaaatcatattccatccatttaaagcgtctggataatcaggaata cgtctaggcattacattaaatccaagaaaatgcataggtaagaatgttaa 

i wrote that, don't know how next.

if $qend > $sendi{     $leg1 = $qendi - $sendi;     open(my @final, '>>', 'contiggeral.fasta') or die;     while (n < $leg1) {     n++ in @nomecontig } 

thanks , sorry bad english.

the condition if non-modifier if must enclosed in parentheses. variables must start sigil (n has none). there no in operator in perl.

my $string = 'abc'; $final_length = 20; $string .= 'n' x ($final_length - length $string); print $string, "\n"; 

Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -