Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Is it possible to get all tetra words with correct starting position using a better code within a loop?

by choroba (Bishop)
on Nov 22, 2012 at 08:51 UTC ( #1005080=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    use warnings;
    use strict;
    ...
    for my $start (0 .. length($string) - $length) {
        say substr($string, $start, $length), " -> Starting at position $s
    +tart.";
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1005080]
help
Chatterbox?
[Discipulus]: yes you know.. happy birthday.. happy birthday..
[jedikaiti]: ahhhh
[jedikaiti]: Never heard it referred to that way
[jedikaiti]: Happy Birthday to him!
[Discipulus]: ah! how do you say in english? .. i was sure..
[Discipulus]: ah turned

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2018-01-18 20:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How did you see in the new year?










    Results (214 votes). Check out past polls.

    Notices?