beginner counting question
- From: "guba@xxxxxxxxxx" <guba@xxxxxxxxxx>
- Date: 30 Mar 2007 11:10:03 -0700
Hello,
I have a list like
@list = ('40', '30', '30', '20');
The entries in this list are control numbers
that define the number of steps something
must be done. The question is how a
counting variable can be defined that counts
continuously inside two loops i.e. I want
something like
do 40 steps something and count from 1..40
do 30 steps something and count from 41..70
do 30 steps something and count from 71..100
do 20 steps something and count from 101..120
with two variable $i and $j:
for ($i = 0; $i <= @list; $i++) {
$move_steps = $list[$i];
for ($j = 1; $i <= $move_steps; $i++) {
do something
$count = ???
$name = $nametemplate . "-" . $count . ".JPG";
};
};
Thank you!
Günter
.
- Follow-Ups:
- Re: beginner counting question
- From: Purl Gurl
- Re: beginner counting question
- Prev by Date: Re: create gui
- Next by Date: www::mechanize question
- Previous by thread: A question on perl debugger
- Next by thread: Re: beginner counting question
- Index(es):