in reply to weighting regex patterns
while(<>) { /(\d+) (\d+) (\d+) (\d+).*/ and $dna= ($1>0?"a":"") . ($2>0?"t":"") . ($3>0?"g":"") . ($4>0?"c":""); } [download]