Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
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 lurking in the Monastery: (5)
As of 2014-12-18 02:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (41 votes), past polls