biohisham has asked for the wisdom of the Perl Monks concerning the following question:
this code only prints (9 .. 5) but this code works just fine@array=(1,2,3,4,5,6,7,8,9); while($index < $#array+1){ $last=pop(@array); print "$last\n"; $index++; }
@array=(1,2,3,4,5,6,7,8,9); $end=($#array+1); while($index < $end){ $last=pop(@array); print "$last\n"; $index++; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: $#array issue
by Your Mother (Archbishop) on Jun 14, 2009 at 22:59 UTC | |
|
Re: $#array issue
by citromatik (Curate) on Jun 14, 2009 at 23:01 UTC | |
by Your Mother (Archbishop) on Jun 14, 2009 at 23:14 UTC | |
|
Re: $#array issue
by Your Mother (Archbishop) on Jun 14, 2009 at 23:21 UTC | |
|
Re: $#array issue
by shmem (Chancellor) on Jun 14, 2009 at 23:59 UTC | |
|
Re: $#array issue
by jwkrahn (Abbot) on Jun 14, 2009 at 23:32 UTC | |
|
Re: $#array issue
by JavaFan (Canon) on Jun 14, 2009 at 23:28 UTC | |
|
Re: $#array issue
by QM (Parson) on Jun 15, 2009 at 18:44 UTC | |
|
Re: $#array issue
by shmem (Chancellor) on Jun 15, 2009 at 00:05 UTC | |
by biohisham (Priest) on Jun 15, 2009 at 16:04 UTC |