in reply to Identifying Reverse Position of Specific Character in a String

$ perl -le' @strings = qw/ GNNTCGANNTT GAATCGNNNTT GANNCGNNNNN /; for ( @strings ) { push @results, []; unshift @{ $results[ -1 ] }, length() - pos() while /N+/g; } print "@$_" for @results; ' 2 8 2 0 7
  • Comment on Re: Identifying Reverse Position of Specific Character in a String
  • Download Code