
Jasmine
Administrator
/ Moderator
Jan 2, 2001, 8:53 AM
Post #2 of 2
(570 views)
|
|
Re: Display Array Content error............
[In reply to]
|
Can't Post
|
|
The question is what is in @array when you run this snippet. Basically you're saying "i is equal to 1. While i is less than then the total number of elements in @array, increment i and print something". If you're not starting out with at least 11 elements in @array, nothing will be printed.
@array = (1 .. 11); for($i=10; $i<@array; $i++) { print "$i\n"; } The above prints out the number 10 only.
|