Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^2: More while issues

by Dandello (Scribe)
on Mar 05, 2011 at 00:47 UTC ( #891530=note: print w/replies, xml ) Need Help??


in reply to Re: More while issues
in thread More while issues

Considering the vast majority of my variables look like $dr5[$rn] and $datay{$data[$drp]}, $chntot (change total) is clear as day.

We really need smileys here. - I wonder what chntot means in Nepalese.

This is the latest working version BTW

sub rankdwn { my ( $yb, $chntot, $incrsdel ) = @_; my $cnd_a = $aod[$yb] =~ tr/a/a/; my $cnd_y = $aod[$yb] =~ tr/y/y/; my $letter = 'a'; if ( ( $cnd_a + $cnd_y ) <= $incrsdel ) { $aod[$yb] =~ s/a/y/gsxm; $cnd_y += $cnd_a; $letter = 'c'; } while ( $cnd_y < $incrsdel ) { my $xda = int rand( $chntot + 1 ); if ( substr( $aod[$yb], $xda, 1 ) eq $letter ) { substr $aod[$yb], $xda, 1, 'y'; $cnd_y++; } } return; }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://891530]
help
Chatterbox?
[choroba]: Can you steal the code from pm-cb-g?
[Tanktalus]: maybe next week at the earliest. :P
[Tux]: Don't you ♥ Unicode :)
[Tanktalus]: Tux: usually, yes. :P

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2017-09-25 21:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (291 votes). Check out past polls.

    Notices?