Re: beginner counting question
- From: Purl Gurl <purlgurl@xxxxxxxxxxxx>
- Date: Sat, 31 Mar 2007 11:37:42 -0700
Purl Gurl wrote:
guba wrote:
That not what I meant. I need all the
intermediate values of $count in the
inner loop for generating $name.
Taking your example @Steps I need for
All intermediate values are there. You
only need to access and use those values.
Pay Attention:
#!perl
@Steps = (2, 4, 4, 2);
for (@Steps)
{
for (1 .. $_)
{
print "$_ ";
$count++;
print "COUNT: $count\n"
}
}
PRINTED RESULTS:
1 COUNT: 1
2 COUNT: 2
1 COUNT: 3
2 COUNT: 4
3 COUNT: 5
4 COUNT: 6
1 COUNT: 7
2 COUNT: 8
3 COUNT: 9
4 COUNT: 10
1 COUNT: 11
2 COUNT: 12
Purl Gurl
.
- References:
- beginner counting question
- From: guba@xxxxxxxxxx
- Re: beginner counting question
- From: Purl Gurl
- Re: beginner counting question
- From: guba@xxxxxxxxxx
- Re: beginner counting question
- From: Purl Gurl
- beginner counting question
- Prev by Date: Re: beginner counting question
- Next by Date: WWW:mechanize to fetch content from a web page as you would do with the mouse
- Previous by thread: Re: beginner counting question
- Next by thread: www::mechanize question
- Index(es):