Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Why am I getting the result only from 1st substring and not from substring 2 and 3 in using the do-until loop with while loop inside it?

by Eliya (Vicar)
on May 18, 2012 at 12:04 UTC ( #971290=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $offs = 0;
    while (my $fm= substr($DNA1, $offs, 4)) {
        $offs += 4;
        ...
    }
    
  2. or download this
    for (my $offs=0; my $fm=substr($DNA1, $offs, 4); $offs+=4 ) {
        ...
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://971290]
help
Chatterbox?
[atcroft]: PriNet: Those code bits worked for me, with test hashes, but I didn't test it with more than a few simple test cases. *shrug* Had hoped it would help, at least.

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (2)
As of 2017-06-28 03:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (619 votes). Check out past polls.