Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^2: Efficient walk/iterate along a string

by GrandFather (Sage)
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 romping around the Monastery: (12)
As of 2015-05-06 10:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    In my home, the TV remote control is ...









    Results (133 votes), past polls