Beefy Boxes and Bandwidth Generously Provided by pair Networks DiBona
No such thing as a small change
 
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 perusing the Monastery: (10)
As of 2014-04-19 06:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (478 votes), past polls