Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^2: Efficient walk/iterate along a string

by GrandFather (Cardinal)
on Nov 23, 2010 at 06:52 UTC ( #873121=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
    my @segments = map {[$_, (scalar tr/STY//)]} split /(?<=[KR])/, $str;
    
    printf "%45s: %d\n", @$_ for @segments;
    
  2. or download this
                                     GVGFTVILISFK: 2
                      YVGFFYNVIIAWALHYFFSSFTMDLPR: 6
       WIHCNNTWNSPNCSDAHASNSSDGLGLNDTFGTTPAAEYFER: 10
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://873121]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (9)
As of 2014-11-23 11:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (131 votes), past polls