in reply to count down with while loop

Probably quicker to jump in increments of $integer.

$ perl -Mstrict -Mwarnings -E ' my $lower = 100; my $upper = 200; my $int = 15; my $start = int( $upper / $int ) * $int; while ( $start >= $lower ) { say $start; $start -= $int; }' 195 180 165 150 135 120 105 $

I hope this is helpful.

Cheers,

JohnGG

Replies are listed 'Best First'.
Re^2: count down with while loop
by rshoe (Novice) on Oct 23, 2014 at 16:47 UTC
    JohnGG: Thanks for you help. The user puts in the amount to count down and then it is adjusted from there. I appreciate all your help. Thanks, R.