in reply to
For Loops and Reversing output
Are you looking to print your array in reverse order. If thats the case its easy. just loop in the following way for (my $i=$#sorted; $i>0 ; $i--) { print $sorted
$i
, "\n"; } Hope this helps
Comment on
Re: For Loops and Reversing output
Replies are listed 'Best First'.
Re^2: For Loops and Reversing output
by
ikegami
(Patriarch)
on Dec 12, 2006 at 17:03 UTC
That should be
for (my $i=$#sorted; $i>=0; $i--)
(
>=0
, not
>0
), and it's the first thing mentioned in the first reply.
[reply]
[d/l]
[select]
In Section
Seekers of Perl Wisdom